This is an archive of the discontinued LLVM Phabricator instance.

Add support for more OS types to AddClangModuleCompilationOptionsForSDKType()
ClosedPublic

Authored by aprantl on Oct 14 2020, 2:33 PM.

Details

Summary

[This is upstreaming an Apple Silicon support patch rdar://problem/66927829]

This patch also avoids hardcoding the clang options, which makes it less likely for them to become out-of-date.

rdar://problem/63791367

Diff Detail

Event Timeline

aprantl requested review of this revision.Oct 14 2020, 2:33 PM
aprantl created this revision.
teemperor requested changes to this revision.Oct 15 2020, 12:51 AM
teemperor added inline comments.
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
1525

Triple::OSType host_os = HostInfo::GetTargetTriple().getOS(); ?

1578

opt_mtvos_version_min_EQ

1586

If this is on purpose, then I think there should be a comment explaining why this is not -mbridgeos-version-min= ?

This revision now requires changes to proceed.Oct 15 2020, 12:51 AM

Thanks for refactoring this!

aprantl updated this revision to Diff 298453.Oct 15 2020, 1:28 PM

Address review feedback

aprantl added inline comments.Oct 15 2020, 3:28 PM
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
1525

I think the idea was to avoid pointlessly calling it for the simulators.

1578

Thank you!

1586

The Clang support for this doesn't exist on llvm.org. I have removed it.

JDevlieghere added inline comments.Oct 15 2020, 8:33 PM
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
1598

I think this applies to the rest of the function and would make things a bit more readable, but here it would certainly improve things.

1598–1599

Would save a copy 🤷‍♂️

This revision was not accepted when it landed; it landed in state Needs Review.Oct 16 2020, 11:43 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 16 2020, 11:43 AM