[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON
Azharuddin Mohammed via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 26 13:03:22 PDT 2022
azharudd created this revision.
azharudd added reviewers: yln, delcypher, beanz, phosek.
Herald added a subscriber: mgorny.
Herald added a project: All.
azharudd requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
When building with LLVM_BUILD_EXTERNAL_COMPILER_RT=ON (where we build
compiler-rt with the just built clang), the compiler-rt tests are being
enabled based on LLVM_INCLUDE_TESTS and not COMPILER_RT_INCLUDE_TESTS,
thereby providing no way to disable just the compiler-rt tests.
This change makes the compiler-rt tests depend on COMPILER_RT_INCLUDE_TESTS
instead. The default value of COMPILER_RT_INCLUDE_TESTS is set to the
value of LLVM_INCLUDE_TESTS (this retains the existing behavior too).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124474
Files:
clang/runtime/CMakeLists.txt
Index: clang/runtime/CMakeLists.txt
===================================================================
--- clang/runtime/CMakeLists.txt
+++ clang/runtime/CMakeLists.txt
@@ -22,6 +22,8 @@
endif()
endfunction()
+option(COMPILER_RT_INCLUDE_TESTS "Generate build targets for compiler-rt tests." ${LLVM_INCLUDE_TESTS})
+
set(COMPILER_RT_SRC_ROOT ${LLVM_MAIN_SRC_DIR}/projects/compiler-rt)
# Fallback to the external path, if the other one isn't available.
# This is the same behavior (try "internal", then check the LLVM_EXTERNAL_...
@@ -62,7 +64,7 @@
if(TARGET cxx-headers)
list(APPEND compiler_rt_configure_deps "cxx-headers")
endif()
- if(LLVM_INCLUDE_TESTS)
+ if(COMPILER_RT_INCLUDE_TESTS)
list(APPEND compiler_rt_configure_deps LLVMTestingSupport)
endif()
@@ -85,7 +87,6 @@
-DCOMPILER_RT_OUTPUT_DIR=${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}
-DCOMPILER_RT_EXEC_OUTPUT_DIR=${LLVM_RUNTIME_OUTPUT_INTDIR}
-DCOMPILER_RT_INSTALL_PATH:PATH=lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}
- -DCOMPILER_RT_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX}
-DLLVM_RUNTIME_OUTPUT_INTDIR=${LLVM_RUNTIME_OUTPUT_INTDIR}
@@ -129,7 +130,7 @@
VERBATIM USES_TERMINAL)
endforeach()
- if(LLVM_INCLUDE_TESTS)
+ if(COMPILER_RT_INCLUDE_TESTS)
# Add binaries that compiler-rt tests depend on.
set(COMPILER_RT_TEST_DEPENDENCIES
FileCheck count not llvm-nm llvm-objdump llvm-symbolizer llvm-jitlink)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124474.425288.patch
Type: text/x-patch
Size: 1635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220426/4990d5ef/attachment.bin>
More information about the cfe-commits
mailing list