Skip to content

Commit c698174

Browse files
committed
Fix error on empty target-cpu
1 parent 2bd20ea commit c698174

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Library/Homebrew/extend/os/mac/hardware.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def self.rustflags_target_cpu(version = nil)
3535
MacOS.version
3636
end
3737
if Hardware::CPU.intel? && version >= :mojave
38-
"-Ctarget-cpu=nehalem"
38+
"'-Ctarget-cpu=nehalem'"
3939
else
4040
generic_rustflags_target_cpu
4141
end

Library/Homebrew/formula.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,7 @@ def std_configure_args
15441544
sig { params(root: T.any(String, Pathname), path: String).returns(T::Array[T.any(String, Pathname)]) }
15451545
def std_cargo_args(root: prefix, path: ".")
15461546
["--locked", "--root", root, "--path", path, "--config",
1547-
"build.rustflags=['#{Hardware.rustflags_target_cpu}']"]
1547+
"build.rustflags=[#{Hardware.rustflags_target_cpu}]"]
15481548
end
15491549

15501550
# Standard parameters for CMake builds.

0 commit comments

Comments
 (0)