This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizers][Darwin] Allows flag '-mtargetos' to be used to set minimum deployment target.
ClosedPublic

Authored by thetruestblue on Jul 25 2022, 9:09 PM.

Details

Summary

Currently, m{platform}-version-min is default flag used to set min deployment target within compilter-rt and sanitizers.
However, clang uses flags -target and -mtargetos for setting target triple and minimum deployment targets.
-mtargetos will be the preferred flag to set min version in the future and the
${platform}-version-min flag will not be used for future platforms.

This change allows darwin platforms to use either ${platform}-min-version or -mtargetos
without breaking lit test flags that allows for overriding the default min value in lit tests
Tests using flags: 'darwin_min_target_with_tls_support', 'min_macos_deployment_target'
will no longer fail if they use mtargetos instead of version-min.

rdar://81028225

Diff Detail

Event Timeline

thetruestblue created this revision.Jul 25 2022, 9:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2022, 9:09 PM
Herald added a subscriber: Enna1. · View Herald Transcript
thetruestblue requested review of this revision.Jul 25 2022, 9:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2022, 9:09 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
thetruestblue retitled this revision from [Sanitizers][Darwin] Allows '-mtargetos' to used to set minimum deployment target. to [Sanitizers][Darwin] Allows flag '-mtargetos' to be used to set minimum deployment target..Jul 25 2022, 9:19 PM
yln accepted this revision.Jul 26 2022, 10:47 AM
This revision is now accepted and ready to land.Jul 26 2022, 10:47 AM