[all-commits] [llvm/llvm-project] 754528: [compiler-rt] Don't detect a versioned clang test ...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Mon Dec 2 11:50:13 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 75452831948d86674374f645df75c543f4587635
      https://github.com/llvm/llvm-project/commit/75452831948d86674374f645df75c543f4587635
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2024-12-02 (Mon, 02 Dec 2024)

  Changed paths:
    M compiler-rt/cmake/base-config-ix.cmake

  Log Message:
  -----------
  [compiler-rt] Don't detect a versioned clang test compiler as GCC

I was trying to build compiler-rt with /usr/bin/clang-17 and the testsuite
failed due to the code in lit.common.cfg.py:
```
# GCC-ASan uses dynamic runtime by default (since config.bits is not set).
if config.compiler_id == "GNU":
    gcc_dir = os.path.dirname(config.clang)
    libasan_dir = os.path.join(gcc_dir, "..", "lib" + config.bits)
    push_dynamic_library_lookup_path(config, libasan_dir)
```

Fix this in two ways: First, if the test compiler matches the library
compiler, set COMPILER_RT_TEST_COMPILER_ID to CMAKE_C_COMPILER_ID. Second,
relax the regex detecting clang to allow any kind of suffix.

Reviewed By: compnerd

Pull Request: https://github.com/llvm/llvm-project/pull/117812



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list