diff --git a/Library/Homebrew/extend/os/mac/hardware.rb b/Library/Homebrew/extend/os/mac/hardware.rb index d7c3f76d95326..1bfd2feea075c 100644 --- a/Library/Homebrew/extend/os/mac/hardware.rb +++ b/Library/Homebrew/extend/os/mac/hardware.rb @@ -35,7 +35,7 @@ def self.rustflags_target_cpu(version = nil) 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 46a68eb38f601..0ddd74cc6c442 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1544,7 +1544,7 @@ def std_configure_args 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.