Skip to content

Commit

Permalink
Apply cpu-optimisation to Rust projects (hardcoded)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokarak committed Jun 13, 2023
1 parent 5097876 commit 42cd342
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,11 @@ def std_configure_args
# Standard parameters for cargo builds.
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]
["--locked", "--root", root, "--path", path,
"--config", "target.x86_64-apple-darwin.rustflags=['-Ctarget-cpu=nehalem']",
"--config", "target.aarch64-apple-darwin.rustflags=['-Ctarget-cpu=apple-m1'],
# Default target-cpu is apple-m1 since Rust 1.71.0
]
end
# Standard parameters for CMake builds.
Expand Down

0 comments on commit 42cd342

Please sign in to comment.