This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Simplify the logic to detect compiler flag support
ClosedPublic

Authored by JDevlieghere on Feb 3 2021, 7:17 PM.

Details

Summary

This patch effectively does these things:

  • Centralize the logic to figure out if a compiler flag is supported.
  • Stop sanity checking whether the compiler works at all. While useful, that's not the decorator's responsibility.
  • Invoke the compiler with xcrun on Darwin so we know where to find the sysroot.

On my machine, the clang invocation couldn't find libSystem and therefore the decorator would fail the sanity check and it would always try to run the ASan/UBSan/TSan tests even though I wasn't building compiler-rt.

Diff Detail

Event Timeline

JDevlieghere requested review of this revision.Feb 3 2021, 7:17 PM
JDevlieghere created this revision.
labath accepted this revision.Feb 4 2021, 6:20 AM

This seems to improve things

This revision is now accepted and ready to land.Feb 4 2021, 6:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2021, 8:53 AM