summaryrefslogtreecommitdiff
path: root/runtimes
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2017-03-23 22:40:10 +0000
committerPetr Hosek <phosek@chromium.org>2017-03-23 22:40:10 +0000
commit3d91fe7c1a965599bb4c0f974b07a10d619b4d3d (patch)
treed38ebbe60c4e4464d2e797d01f37b0ed3a03185b /runtimes
parent2884223490c6e0142cbb2ef2f19b196850fd2ab4 (diff)
[CMake] Provide an option to disable runtimes build
This could be used to either disable the runtimes build altogether or avoid building them but still generate the build targets. Differential Revision: https://reviews.llvm.org/D31060 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtimes')
-rw-r--r--runtimes/CMakeLists.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index f5d16952b40..24b7e041d5f 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -145,6 +145,10 @@ else() # if this is included from LLVM's CMake
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/Components.cmake)
include(LLVMExternalProjectUtils)
+ if(NOT LLVM_BUILD_RUNTIMES)
+ set(EXTRA_ARGS EXCLUDE_FROM_ALL)
+ endif()
+
# If compiler-rt is present we need to build the builtin libraries first. This
# is required because the other runtimes need the builtin libraries present
# before the just-built compiler can pass the configuration tests.
@@ -157,7 +161,8 @@ else() # if this is included from LLVM's CMake
-DCMAKE_C_COMPILER_TARGET=${TARGET_TRIPLE}
-DCMAKE_ASM_COMPILER_TARGET=${TARGET_TRIPLE}
PASSTHROUGH_PREFIXES COMPILER_RT
- USE_TOOLCHAIN)
+ USE_TOOLCHAIN
+ ${EXTRA_ARGS})
else()
get_cmake_property(variableNames VARIABLES)
add_custom_target(builtins)
@@ -179,7 +184,8 @@ else() # if this is included from LLVM's CMake
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=On
${${target}_extra_args}
PASSTHROUGH_PREFIXES COMPILER_RT
- USE_TOOLCHAIN)
+ USE_TOOLCHAIN
+ ${EXTRA_ARGS})
add_dependencies(builtins builtins-${target})
endforeach()
endif()
@@ -238,7 +244,8 @@ else() # if this is included from LLVM's CMake
${SUB_COMPONENTS}
${SUB_COMPONENT_CHECK_TARGETS}
${SUB_INSTALL_TARGETS}
- USE_TOOLCHAIN)
+ USE_TOOLCHAIN
+ ${EXTRA_ARGS})
# TODO: This is a hack needed because the libcxx headers are copied into the
# build directory during configuration. Without that step the clang in the