[PATCH] D57992: [CMake] Don't set <PROJECT>_STANDALONE_BUILD
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 8 19:06:59 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL353601: [CMake] Don't set <PROJECT>_STANDALONE_BUILD (authored by phosek, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D57992?vs=186094&id=186096#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57992/new/
https://reviews.llvm.org/D57992
Files:
compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
llvm/trunk/runtimes/CMakeLists.txt
Index: llvm/trunk/runtimes/CMakeLists.txt
===================================================================
--- llvm/trunk/runtimes/CMakeLists.txt
+++ llvm/trunk/runtimes/CMakeLists.txt
@@ -87,6 +87,7 @@
# 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 @@
# 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 @@
# 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
Index: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
@@ -515,7 +515,7 @@
if(LIBCXX_USE_TOOLCHAIN)
set(compiler_args -DCMAKE_C_COMPILER=${COMPILER_RT_TEST_COMPILER}
-DCMAKE_CXX_COMPILER=${COMPILER_RT_TEST_CXX_COMPILER})
- if(NOT COMPILER_RT_STANDALONE_BUILD)
+ if(NOT COMPILER_RT_STANDALONE_BUILD AND NOT RUNTIMES_BUILD)
set(toolchain_deps $<TARGET_FILE:clang>)
set(force_deps DEPENDS $<TARGET_FILE:clang>)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57992.186096.patch
Type: text/x-patch
Size: 2257 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190209/13a20fa7/attachment.bin>
More information about the llvm-commits
mailing list