]> granicus.if.org Git - llvm/commitdiff
[CMake] Don't set <PROJECT>_STANDALONE_BUILD
authorPetr Hosek <phosek@chromium.org>
Sat, 9 Feb 2019 03:06:56 +0000 (03:06 +0000)
committerPetr Hosek <phosek@chromium.org>
Sat, 9 Feb 2019 03:06:56 +0000 (03:06 +0000)
We shouldn't be treating runtimes builds as standalone builds since
we have enough of the context loaded into the runtimes environment.

Differential Revision: https://reviews.llvm.org/D57992

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353601 91177308-0d34-0410-b5e6-96231b3b80d8

runtimes/CMakeLists.txt

index 42842409dca50a782bd1ed0b7cdb3576c9944936..a6fe5e35089c54cd9ee771096fa9d0422095f6b6 100644 (file)
@@ -87,6 +87,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
 
   # This variable makes sure that e.g. llvm-lit is found.
   set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR})
+  set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules)
 
   if(APPLE)
     set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
@@ -116,18 +117,20 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
   # Handle common options used by all runtimes.
   include(AddLLVM)
   include(HandleLLVMOptions)
+  include(FindPythonInterp)
 
   set(CMAKE_REQUIRED_FLAGS ${SAFE_CMAKE_REQUIRED_FLAGS})
   set(CMAKE_REQUIRED_LIBRARIES ${SAFE_CMAKE_REQUIRED_LIBRARIES})
 
+  # This can be used to detect whether we're in the runtimes build.
+  set(RUNTIMES_BUILD ON)
+
   foreach(entry ${runtimes})
     get_filename_component(projName ${entry} NAME)
 
     # TODO: Clean this up as part of an interface standardization
     string(REPLACE "-" "_" canon_name ${projName})
     string(TOUPPER ${canon_name} canon_name)
-    # The subdirectories need to treat this as standalone builds
-    set(${canon_name}_STANDALONE_BUILD On)
 
     if(LLVM_RUNTIMES_LIBDIR_SUFFIX)
       set(${canon_name}_LIBDIR_SUFFIX "${LLVM_RUNTIMES_LIBDIR_SUFFIX}" CACHE STRING "" FORCE)
@@ -135,7 +138,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
 
     # Setting a variable to let sub-projects detect which other projects
     # will be included under here.
-    set(HAVE_${canon_name} On)
+    set(HAVE_${canon_name} ON)
   endforeach()
 
   # We do this in two loops so that HAVE_* is set for each runtime before the