[compiler-rt] r288788 - [XRay][compiler-rt] Only add unit tests if we're building XRay.

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 01:43:44 PST 2016


Author: dberris
Date: Tue Dec  6 03:43:44 2016
New Revision: 288788

URL: http://llvm.org/viewvc/llvm-project?rev=288788&view=rev
Log:
[XRay][compiler-rt] Only add unit tests if we're building XRay.

As constructed before this patch, in case we run into case where we
don't actually build the XRay library, we really ought to not be adding
the unit test runs. This should fix the bootstrap build failures.

This is a follow-up further to D26232.

Modified:
    compiler-rt/trunk/lib/xray/tests/CMakeLists.txt
    compiler-rt/trunk/test/xray/CMakeLists.txt

Modified: compiler-rt/trunk/lib/xray/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/tests/CMakeLists.txt?rev=288788&r1=288787&r2=288788&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/xray/tests/CMakeLists.txt Tue Dec  6 03:43:44 2016
@@ -53,6 +53,6 @@ macro(add_xray_unittest testname)
   endif()
 endmacro()
 
-if(COMPILER_RT_CAN_EXECUTE_TESTS AND NOT ANDROID)
+if(COMPILER_RT_CAN_EXECUTE_TESTS)
   add_subdirectory(unit)
 endif()

Modified: compiler-rt/trunk/test/xray/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/CMakeLists.txt?rev=288788&r1=288787&r2=288788&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/xray/CMakeLists.txt Tue Dec  6 03:43:44 2016
@@ -23,14 +23,12 @@ if (COMPILER_RT_BUILD_XRAY AND COMPILER_
       ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg)
     list(APPEND XRAY_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
   endforeach()
-endif()
 
-# Add unit tests.
-if(COMPILER_RT_INCLUDE_TESTS)
-  configure_lit_site_cfg(
-    ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
-    ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg)
-  if (COMPILER_RT_CAN_EXECUTE_TESTS AND NOT ANDROID)
+  # Add unit tests.
+  if(COMPILER_RT_INCLUDE_TESTS)
+    configure_lit_site_cfg(
+      ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
+      ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg)
     list(APPEND XRAY_TEST_DEPS XRayUnitTests)
     list(APPEND XRAY_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Unit)
   endif()




More information about the llvm-commits mailing list