-
Notifications
You must be signed in to change notification settings - Fork 10.5k
ClangImporter: handle -target-cpu
for x86 targets
#72603
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
Conversation
@swift-ci please test Windows platform |
Could you add a test case as well? |
@hyp there already are test cases for this (which is made obvious by the failure in the tests). |
@swift-ci please test Windows platform |
Hmm, that is surprising ... the clang importer tests didn't catch this change. I can try to add a test case I suppose. |
`-mcpu` is a deprecated "alias" (unsupported) on x86 targets for `-mtune`. Unlike `-mcpu`, `-mtune` simply tunes the code for the CPU but does not prevent execution on other targets. In order to match the behaviour of `-mcpu` on ARM, we must use both `-march=` and `-mtune=`. Adjust this behaviour to allow tuning of code for non-Darwin targets.
@swift-ci please test |
@swift-ci please test Linux platform |
@swift-ci please test macOS platform |
@swift-ci please test macOS platform |
1 similar comment
@swift-ci please test macOS platform |
-mcpu
is a deprecated "alias" (unsupported) on x86 targets for-mtune
. Unlike-mcpu
,-mtune
simply tunes the code for the CPU but does not prevent execution on other targets. In order to match the behaviour of-mcpu
on ARM, we must use both-march=
and-mtune=
. Adjust this behaviour to allow tuning of code for non-Darwin targets.