Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply cpu-optimisation to Rust projects #15544

Merged
merged 17 commits into from
Jul 4, 2023
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']",
Tokarak marked this conversation as resolved.
Show resolved Hide resolved
# Default target-cpu is apple-m1 since Rust 1.71.0
]
end

# Standard parameters for CMake builds.
Expand Down