Skip to content

Commit

Permalink
Fix error on empty target-cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokarak committed Jun 13, 2023
1 parent 2bd20ea commit c698174
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/extend/os/mac/hardware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c698174

Please sign in to comment.