[all-commits] [llvm/llvm-project] 727bd8: [lldb] Simplify the logic to detect compiler flag ...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Thu Feb 4 08:53:18 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 727bd89b605b39659c793f338ce1e18dafc3581e
      https://github.com/llvm/llvm-project/commit/727bd89b605b39659c793f338ce1e18dafc3581e
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2021-02-04 (Thu, 04 Feb 2021)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/decorators.py

  Log Message:
  -----------
  [lldb] Simplify the logic to detect compiler flag support

This patch effectively does the following 3 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 macOS Big Sur system, the clang invocation couldn't find libSystem
and would fail the sanity check in the decorator. This meant that the
test suite would always try to run the ASan/UBSan/TSan tests, regardless
of whether compiler-rt was built.

Differential revision: https://reviews.llvm.org/D95995




More information about the All-commits mailing list