[CMake] Use COMPILER_RT_BUILD_CRT in the condition for test
authorPetr Hosek <phosek@google.com>
Wed, 12 Jul 2023 17:41:16 +0000 (17:41 +0000)
committerPetr Hosek <phosek@google.com>
Wed, 12 Jul 2023 22:30:43 +0000 (22:30 +0000)
commitbb7a902c765b9c58412d11df4e2461764f0bbac5
tree03e622f61b90cdfe4af13e0e5d3efcf34b14785f
parenta4c461c063a2ef229d577d050fef3cff7284fc4b
[CMake] Use COMPILER_RT_BUILD_CRT in the condition for test

Unlike COMPILER_RT_HAS_CRT this handles the case where CRT is available
but has been disabled by setting COMPILER_RT_BUILD_CRT. This addresses
an issue reported on D153989.

Differential Revision: https://reviews.llvm.org/D155126
compiler-rt/lib/builtins/CMakeLists.txt
compiler-rt/test/builtins/CMakeLists.txt
compiler-rt/test/builtins/Unit/ctor_dtor.c
compiler-rt/test/builtins/Unit/dso_handle.cpp
compiler-rt/test/builtins/Unit/lit.cfg.py
compiler-rt/test/builtins/Unit/lit.site.cfg.py.in