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

Enforce -mtune=core2 and -mtune=yonah on macOS #245

Merged
merged 1 commit into from
Feb 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/trans/target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,21 @@ namespace
ARCH_X86_64
};
}
else if(target_name == "i686-apple-darwin")
{
// NOTE: OSX uses Mach-O binaries, which don't fully support the defaults used for GNU targets
// The first 32bit Intel Mac was Core Solo aka yonah. It allows to use `-march=yonah` like Rust.
return TargetSpec {
"unix", "macos", "gnu", {CodegenMode::Gnu11, false, "x86_64-apple-darwin", {"-march=yonah"}, {}},
ARCH_X86_64
};
}
else if(target_name == "x86_64-apple-darwin")
{
// NOTE: OSX uses Mach-O binaries, which don't fully support the defaults used for GNU targets
// The first 64bit Intel Mac was Core Duo. It allows to use `-march=core2` like Rust.
return TargetSpec {
"unix", "macos", "gnu", {CodegenMode::Gnu11, false, "x86_64-apple-darwin", {}, {}},
"unix", "macos", "gnu", {CodegenMode::Gnu11, false, "x86_64-apple-darwin", {"-march=core2"}, {}},
ARCH_X86_64
};
}
Expand Down