[compiler-rt] r244549 - [cmake] Hoist check for LLD sources up into root CMakeLists.txt

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 17:33:07 PDT 2015


Author: rnk
Date: Mon Aug 10 19:33:07 2015
New Revision: 244549

URL: http://llvm.org/viewvc/llvm-project?rev=244549&view=rev
Log:
[cmake] Hoist check for LLD sources up into root CMakeLists.txt

We will use this for ASan on Windows soon. When the ELF port of LLD
matures, we can add other sanitizer integration tests to make sure they
work with LLD.

Modified:
    compiler-rt/trunk/CMakeLists.txt
    compiler-rt/trunk/test/cfi/CMakeLists.txt
    compiler-rt/trunk/test/lit.common.cfg
    compiler-rt/trunk/test/lit.common.configured.in

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=244549&r1=244548&r2=244549&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Mon Aug 10 19:33:07 2015
@@ -355,6 +355,14 @@ else()
   set(COMPILER_RT_HAS_LIBCXX_SOURCES FALSE)
 endif()
 
+set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld)
+if(EXISTS ${COMPILER_RT_LLD_PATH}/)
+  set(COMPILER_RT_HAS_LLD_SOURCES TRUE)
+else()
+  set(COMPILER_RT_HAS_LLD_SOURCES FALSE)
+endif()
+pythonize_bool(COMPILER_RT_HAS_LLD_SOURCES)
+
 add_subdirectory(lib)
 
 if(COMPILER_RT_INCLUDE_TESTS)

Modified: compiler-rt/trunk/test/cfi/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/cfi/CMakeLists.txt?rev=244549&r1=244548&r2=244549&view=diff
==============================================================================
--- compiler-rt/trunk/test/cfi/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/cfi/CMakeLists.txt Mon Aug 10 19:33:07 2015
@@ -19,7 +19,7 @@ if(NOT COMPILER_RT_STANDALONE_BUILD)
       LTO
     )
   endif()
-  if(WIN32 AND EXISTS ${CMAKE_SOURCE_DIR}/tools/lld)
+  if(WIN32 AND COMPILER_RT_HAS_LLD_SOURCES)
     list(APPEND CFI_TEST_DEPS
       lld
     )

Modified: compiler-rt/trunk/test/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg?rev=244549&r1=244548&r2=244549&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.cfg (original)
+++ compiler-rt/trunk/test/lit.common.cfg Mon Aug 10 19:33:07 2015
@@ -106,6 +106,10 @@ sanitizer_can_use_cxxabi = getattr(confi
 if sanitizer_can_use_cxxabi:
   config.available_features.add('cxxabi')
 
+# Test lld if it is available.
+if config.has_lld:
+  config.available_features.add('lld')
+
 lit.util.usePlatformSdkOnDarwin(config, lit_config)
 
 def is_darwin_lto_supported():

Modified: compiler-rt/trunk/test/lit.common.configured.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.configured.in?rev=244549&r1=244548&r2=244549&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.configured.in (original)
+++ compiler-rt/trunk/test/lit.common.configured.in Mon Aug 10 19:33:07 2015
@@ -28,6 +28,7 @@ set_default("compiler_rt_debug", @COMPIL
 set_default("compiler_rt_libdir", "@COMPILER_RT_LIBRARY_OUTPUT_DIR@")
 set_default("emulator", "@COMPILER_RT_EMULATOR@")
 set_default("sanitizer_can_use_cxxabi", @SANITIZER_CAN_USE_CXXABI_PYBOOL@)
+set_default("has_lld", @COMPILER_RT_HAS_LLD_SOURCES_PYBOOL@)
 
 # LLVM tools dir can be passed in lit parameters, so try to
 # apply substitution.




More information about the llvm-commits mailing list