summaryrefslogtreecommitdiffstats
path: root/llvm/tools/CMakeLists.txt
diff options
context:
space:
mode:
authorAndy Gibbs <andyg1001@hotmail.co.uk>2013-06-26 08:05:08 +0000
committerAndy Gibbs <andyg1001@hotmail.co.uk>2013-06-26 08:05:08 +0000
commit3ef5ed1ec0eb1a905123d40f2c99ccc57dccd5ab (patch)
treeb8024c25c7ce6826d05d9af14eb8ab4c2d6ba0c3 /llvm/tools/CMakeLists.txt
parentf5dede1bebbf43ca0d9dbe0224252de33cc8a886 (diff)
downloadbcm5719-llvm-3ef5ed1ec0eb1a905123d40f2c99ccc57dccd5ab.tar.gz
bcm5719-llvm-3ef5ed1ec0eb1a905123d40f2c99ccc57dccd5ab.zip
Provide bootstrap support to build only llvm+clang when using cmake.
Where a source tree is complete with lld, lldb and polly, it may not be possible to use cmake to configure build scripts if the host compiler it not capable of compiling these sub-projects. This change makes it possible to first build a bootstrap clang compiler when can then be used to build a complete llvm toolchain. An example bootstrap build sequence could be as follows: $ mkdir bootstrap $ cd bootstrap $ cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_PREFIX_PATH:STRING=$(pwd) -DLLVM_TARGETS_TO_BUILD:STRING=host -DLLVM_INCLUDE_TOOLS:STRING=bootstrap-only ../source $ make clang # build clang only for host $ cd .. $ export CC=$(realpath bootstrap/bin)/clang $ export CXX=$(realpath bootstrap/bin)/clang++ $ mkdir final $ cd final $ cmake -G 'Unix Makefiles' ../source $ make all check-all llvm-svn: 184924
Diffstat (limited to 'llvm/tools/CMakeLists.txt')
-rw-r--r--llvm/tools/CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/tools/CMakeLists.txt b/llvm/tools/CMakeLists.txt
index f651d90865c..e6637813cd5 100644
--- a/llvm/tools/CMakeLists.txt
+++ b/llvm/tools/CMakeLists.txt
@@ -58,8 +58,11 @@ if( LLVM_ENABLE_PIC )
endif()
add_llvm_external_project(clang)
-add_llvm_external_project(lld)
-add_llvm_external_project(lldb)
-add_llvm_external_project(polly)
+
+if( NOT LLVM_INCLUDE_TOOLS STREQUAL "bootstrap-only" )
+ add_llvm_external_project(lld)
+ add_llvm_external_project(lldb)
+ add_llvm_external_project(polly)
+endif()
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
OpenPOWER on IntegriCloud