Skip to content

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

@ldionne

Description

@ldionne
$ 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions