summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--projects/CMakeLists.txt4
2 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c16afaeb5..72901c8876 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -287,6 +287,9 @@ option (LLVM_BUILD_DOCS "Build the llvm documentation." OFF)
option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON)
option (LLVM_ENABLE_DOXYGEN "Use doxygen to generate llvm documentation." OFF)
+option (LLVM_BUILD_EXTERNAL_COMPILER_RT
+ "Build compiler-rt as an external project." OFF)
+
# All options referred to from HandleLLVMOptions have to be specified
# BEFORE this include, otherwise options will not be correctly set on
# first cmake run
diff --git a/projects/CMakeLists.txt b/projects/CMakeLists.txt
index 67943c2e9a..e23a277056 100644
--- a/projects/CMakeLists.txt
+++ b/projects/CMakeLists.txt
@@ -20,7 +20,9 @@ if(${LLVM_BUILD_RUNTIME})
if(NOT MSVC)
add_llvm_external_project(libcxx)
endif()
- add_llvm_external_project(compiler-rt)
+ if(NOT LLVM_BUILD_EXTERNAL_COMPILER_RT)
+ add_llvm_external_project(compiler-rt)
+ endif()
endif()
add_llvm_external_project(dragonegg)