Sometimes users pass this option when targeting embedded architectures like armv7m on non-darwin platforms.
This applies to watchOS and tvOS as well as iOS.
Depends on D155407
Paths
| Differential D155408
[Driver] Also warn about -mwatchos-version-min and -mtvos-version-min ClosedPublic Authored by porglezomp on Jul 16 2023, 2:00 PM.
Details Summary Sometimes users pass this option when targeting embedded architectures like armv7m on non-darwin platforms. Depends on D155407
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Jul 17 2023, 11:36 AM This revision was landed with ongoing or failed builds.Jul 17 2023, 1:27 PM Closed by commit rG45ff63ba6112: [Driver] Also warn about -mwatchos-version-min and -mtvos-version-min (authored by porglezomp). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 541207 clang/lib/Driver/ToolChains/Darwin.cpp
clang/test/Driver/macho-embedded.c
|
I just realized this isn't correct as it accepts -mios-version-min= when the OS is tvOS, e.g., clang -arch armv7m --target=thumbv7-apple-tvos -mios-version-min=5 ....
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/TargetParser/Triple.h#L497
Can you fix this by calling Triple::getOS() to check the OS?