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

[clang] -print-target-triple doesn't work properly on Apple platforms #61762

Open
ldionne opened this issue Mar 28, 2023 · 1 comment
Open

[clang] -print-target-triple doesn't work properly on Apple platforms #61762

ldionne opened this issue Mar 28, 2023 · 1 comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

Comments

@ldionne
Copy link
Member

ldionne commented Mar 28, 2023

$ echo | clang -xc - -###
[...]/bin/clang" "-cc1" "-triple" "arm64-apple-macosx11.0.0" [...]

$ clang -print-target-triple
arm64-apple-darwin22.4.0

So we can see that the compiler knows (at some point) that it should be compiling for macosx11.0.0, but -print-target-triple doesn't know that yet. That's because -print-target-triple is implemented in HandleImmediateArgs which is run before the toolchains::Darwin object is initialized.

@ldionne ldionne added the clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' label Mar 28, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 28, 2023

@llvm/issue-subscribers-clang-driver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl'
Projects
None yet
Development

No branches or pull requests

2 participants