From c69817420028f9610346d2b4600a3da4229fe708 Mon Sep 17 00:00:00 2001 From: Tokarak <63452145+Tokarak@users.noreply.github.com> Date: Tue, 13 Jun 2023 20:40:23 +0100 Subject: [PATCH] Fix error on empty target-cpu --- Library/Homebrew/extend/os/mac/hardware.rb | 2 +- Library/Homebrew/formula.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/extend/os/mac/hardware.rb b/Library/Homebrew/extend/os/mac/hardware.rb index d7c3f76d95..1bfd2feea0 100644 --- a/Library/Homebrew/extend/os/mac/hardware.rb +++ b/Library/Homebrew/extend/os/mac/hardware.rb @@ -35,7 +35,7 @@ module Hardware MacOS.version end if Hardware::CPU.intel? && version >= :mojave - "-Ctarget-cpu=nehalem" + "'-Ctarget-cpu=nehalem'" else generic_rustflags_target_cpu end diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 46a68eb38f..0ddd74cc6c 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1544,7 +1544,7 @@ class Formula sig { params(root: T.any(String, Pathname), path: String).returns(T::Array[T.any(String, Pathname)]) } def std_cargo_args(root: prefix, path: ".") ["--locked", "--root", root, "--path", path, "--config", - "build.rustflags=['#{Hardware.rustflags_target_cpu}']"] + "build.rustflags=[#{Hardware.rustflags_target_cpu}]"] end # Standard parameters for CMake builds.