inhert_rustflags: Pass -Ctarget-cpu as -mcpu#1649
Open
evanj wants to merge 1 commit intorust-lang:mainfrom
Open
inhert_rustflags: Pass -Ctarget-cpu as -mcpu#1649evanj wants to merge 1 commit intorust-lang:mainfrom
evanj wants to merge 1 commit intorust-lang:mainfrom
Conversation
This is probably not quite correct, but it "works for me" on aarch64 Linux. I think this should not cause errors, since the flag detection tests if clang/gcc supports the string before it uses it.
Contributor
Author
|
This is probably wrong! In particular: the test is failing on x86 due to the flag detection. I'll probably have to do something gross to fix it. I'd love feedback on how to test this, and how to improve it. This is fairly important for ensuring the C/C++ code being compiled has the correct CPU features (e.g. CRC32, AES, etc). If this is accepted, I'll also make a similar attempt to support |
This was referenced Jan 5, 2026
Contributor
|
Hmmm I think the -mcpu value might be slightly different msvc and clang/gcc at the very least? |
Member
|
MSVC's |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is probably not quite correct, but it "works for me" on aarch64 Linux. I think this should not cause errors, since the flag detection tests if clang/gcc supports the string before it uses it.