[all-commits] [llvm/llvm-project] dfafe3: Reland "[compiler-rt] Allow running tests without ...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Fri Apr 12 13:45:36 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dfafe3822b1e59f938c256c25a92a7b555f78469
      https://github.com/llvm/llvm-project/commit/dfafe3822b1e59f938c256c25a92a7b555f78469
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2024-04-12 (Fri, 12 Apr 2024)

  Changed paths:
    M compiler-rt/CMakeLists.txt
    M compiler-rt/cmake/Modules/AddCompilerRT.cmake
    M compiler-rt/test/CMakeLists.txt
    M compiler-rt/test/fuzzer/lit.cfg.py
    M compiler-rt/test/lit.common.cfg.py
    M compiler-rt/test/lit.common.configured.in
    M compiler-rt/test/safestack/lit.cfg.py

  Log Message:
  -----------
  Reland "[compiler-rt] Allow running tests without installing first"

Currently, the testsuite uses the default runtimes path to find the
runtimes libraries which may or may not match the just-built runtimes.
This change uses the `-resource-dir` flag for clang whenever
`COMPILER_RT_TEST_STANDALONE_BUILD_LIBS` is set to ensure that we are
actually testing the currently built libraries rather than the ones
bundled with `${COMPILER_RT_TEST_COMPILER}`.

The existing logic works fine when clang and compiler-rt share the same
build directory ``-DLLVM_ENABLE_PROJECTS=clang;compiler-rt`, but when
building compiler-rt separately we need to tell the compiler used for
the tests where it can find the just-built libraries.

This reduces the fixes check-all failures to one in my configuration:
```
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja
-DCMAKE_C_COMPILER=$HOME/output/upstream-llvm/bin/clang
-DCMAKE_CXX_COMPILER=$HOME/output/upstream-llvm/bin/clang++
-DCOMPILER_RT_INCLUDE_TESTS=ON
-DLLVM_EXTERNAL_LIT=$HOME/build/upstream-llvm-project-build/bin/llvm-lit
-DLLVM_CMAKE_DIR=$HOME/output/upstream-llvm
-DCOMPILER_RT_DEBUG=OFF
-S $HOME/src/upstream-llvm-project/compiler-rt
-B $HOME/src/upstream-llvm-project/compiler-rt/cmake-build-all-sanitizers
```

This relands the previous PR with fixes for Windows.
Depends on https://github.com/llvm/llvm-project/pull/88074 to be merged
first for GCC buildbots.

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



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