Skip to content

Conversation

@evanj
Copy link
Contributor

@evanj evanj commented Jan 5, 2026

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.

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.
@evanj
Copy link
Contributor Author

evanj commented Jan 5, 2026

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 -Ctarget-feature, but the target-cpu flag is probably more impactful.

@NobodyXu
Copy link
Contributor

NobodyXu commented Jan 7, 2026

Hmmm I think the -mcpu value might be slightly different msvc and clang/gcc at the very least?

cc @madsmtm @ChrisDenton

@ChrisDenton
Copy link
Member

MSVC's cl doesn't have a mcpu or equivalent flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants