[compiler-rt] r313191 - Revert "Determine up front which projects are enabled."

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 13:49:25 PDT 2017


Author: zturner
Date: Wed Sep 13 13:49:25 2017
New Revision: 313191

URL: http://llvm.org/viewvc/llvm-project?rev=313191&view=rev
Log:
Revert "Determine up front which projects are enabled."

This was intended to be a generic CMake solution to a problem
shared across several projects.  It turns out it doesn't interact
very well certain CMake configurations, and furthermore the
"problem" is actually not a problem, as the problematic code
is never executed to begin with.  So this really isn't solving
anything.

Modified:
    compiler-rt/trunk/CMakeLists.txt

Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=313191&r1=313190&r2=313191&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Wed Sep 13 13:49:25 2017
@@ -225,7 +225,7 @@ append_list_if(COMPILER_RT_DEBUG -DSANIT
 # always respect the optimization flags set by CMAKE_BUILD_TYPE instead.
 if (NOT MSVC)
 
-  # Build with optimization, unless we're in debug mode.
+  # Build with optimization, unless we're in debug mode. 
   if(COMPILER_RT_DEBUG)
     list(APPEND SANITIZER_COMMON_CFLAGS -O0)
   else()
@@ -315,16 +315,28 @@ endif()
 
 add_subdirectory(include)
 
-set(COMPILER_RT_HAS_LIBCXX_SOURCES ${LLVM_PROJECT_LIBCXX_ENABLED})
-if (LLVM_PROJECT_LIBCXX_ENABLED)
-  set(COMPILER_RT_LIBCXX_PATH ${LLVM_PROJECT_LIBCXX_SOURCE_DIR})
-  message("compiler-rt libcxx enabled at ${COMPILER_RT_LIBCXX_PATH}")
+set(COMPILER_RT_LIBCXX_PATH ${LLVM_MAIN_SRC_DIR}/projects/libcxx)
+if(EXISTS ${COMPILER_RT_LIBCXX_PATH}/)
+  set(COMPILER_RT_HAS_LIBCXX_SOURCES TRUE)
+else()
+  set(COMPILER_RT_LIBCXX_PATH ${LLVM_MAIN_SRC_DIR}/../libcxx)
+  if(EXISTS ${COMPILER_RT_LIBCXX_PATH}/)
+    set(COMPILER_RT_HAS_LIBCXX_SOURCES TRUE)
+  else()
+    set(COMPILER_RT_HAS_LIBCXX_SOURCES FALSE)
+  endif()
 endif()
 
-set(COMPILER_RT_HAS_LLD ${LLVM_PROJECT_LLD_ENABLED})
-if (LLVM_PROJECT_LLD_ENABLED)
-  set(COMPILER_RT_LLD_PATH ${LLVM_PROJECT_LLD_SOURCE_DIR})
-  message("compiler-rt lld enabled at ${COMPILER_RT_LLD_PATH}")
+set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/tools/lld)
+if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
+  set(COMPILER_RT_HAS_LLD TRUE)
+else()
+  set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/../lld)
+  if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
+    set(COMPILER_RT_HAS_LLD TRUE)
+  else()
+    set(COMPILER_RT_HAS_LLD FALSE)
+  endif()
 endif()
 pythonize_bool(COMPILER_RT_HAS_LLD)
 




More information about the llvm-commits mailing list