llvm-project
a5a7f626 - [compiler-rt] CRT builtins tests should not run on mac/windows under LLVM_ENABLE_RUNTIMES (#187835)

Commit
35 days ago
[compiler-rt] CRT builtins tests should not run on mac/windows under LLVM_ENABLE_RUNTIMES (#187835) #171941 got the builtins tests running under LLVM_ENABLE_RUNTIMES by testing the builtins as part of the runtimes build. As a consequence, CMake in `lib/builtins/` is no longer visible when configuring the tests (but `test/builtins/` is). This means that the `cmake_dependent_option` from `lib/builtins/` is not accounted for by the tests, allowing COMPILER_RT_BUILD_CRT to be YES when COMPILER_RT_HAS_CRT is NO. As a consequence, the CRT tests are running on platforms where COMPILER_RT_HAS_CRT is false (#176892). https://github.com/llvm/llvm-project/blob/367da15a11c52886c50e7f020cb4de59fe6d07ca/compiler-rt/lib/builtins/CMakeLists.txt#L1106-L1108 Although the long-term solution could be to split both the builtins (and their tests) out of compiler-rt into a top-level directory with shared options, this works around the issue for the moment by checking both COMPILER_RT_HAS_CRT and COMPILER_RT_BUILD_CRT before enabling the "crt" feature. Fixes #176892
Author
Parents
Loading