summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorChris Bieneman <chris.bieneman@me.com>2019-06-05 17:35:38 +0000
committerChris Bieneman <chris.bieneman@me.com>2019-06-05 17:35:38 +0000
commitd96d38ef0117656cf3393d56a2637de6ba63c3ca (patch)
treeda893044a637c4be4fc42c5306b60a055b5cd5aa /cmake
parent917cbd35d7dff83de78206ff7b584e0a740cbe6a (diff)
downloadclang-d96d38ef0117656cf3393d56a2637de6ba63c3ca.tar.gz
Use LTO capable linker
Summary: In DistributionExample.cmake be sure we use a LTO capable linker, the easiest to choose is lld. Reviewers: beanz Reviewed By: beanz Patch By: winksaville Subscribers: mgorny, mehdi_amini, inglorion, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62279 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/caches/DistributionExample-stage2.cmake2
-rw-r--r--cmake/caches/DistributionExample.cmake7
2 files changed, 7 insertions, 2 deletions
diff --git a/cmake/caches/DistributionExample-stage2.cmake b/cmake/caches/DistributionExample-stage2.cmake
index f4d5d92d1d..99d5dc0fd2 100644
--- a/cmake/caches/DistributionExample-stage2.cmake
+++ b/cmake/caches/DistributionExample-stage2.cmake
@@ -2,7 +2,7 @@
# bootstrap build.
set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "")
-set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx" CACHE STRING "")
+set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi" CACHE STRING "")
set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "")
diff --git a/cmake/caches/DistributionExample.cmake b/cmake/caches/DistributionExample.cmake
index 35493edd17..50fcc09cf0 100644
--- a/cmake/caches/DistributionExample.cmake
+++ b/cmake/caches/DistributionExample.cmake
@@ -2,7 +2,7 @@
#Enable LLVM projects and runtimes
set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "")
-set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx" CACHE STRING "")
+set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi" CACHE STRING "")
# Only build the native target in stage1 since it is a throwaway build.
set(LLVM_TARGETS_TO_BUILD Native CACHE STRING "")
@@ -17,6 +17,11 @@ set(PACKAGE_VENDOR LLVM.org CACHE STRING "")
# the proper LTO library dependencies can be connected.
set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "")
+if (NOT APPLE)
+ # Since LLVM_ENABLE_LTO is ON we need a LTO capable linker
+ set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")
+endif()
+
# Expose stage2 targets through the stage1 build configuration.
set(CLANG_BOOTSTRAP_TARGETS
check-all