r362624 - Use LTO capable linker

Chris Bieneman via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 5 10:35:38 PDT 2019


Author: cbieneman
Date: Wed Jun  5 10:35:38 2019
New Revision: 362624

URL: http://llvm.org/viewvc/llvm-project?rev=362624&view=rev
Log:
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

Modified:
    cfe/trunk/cmake/caches/DistributionExample-stage2.cmake
    cfe/trunk/cmake/caches/DistributionExample.cmake

Modified: cfe/trunk/cmake/caches/DistributionExample-stage2.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/cmake/caches/DistributionExample-stage2.cmake?rev=362624&r1=362623&r2=362624&view=diff
==============================================================================
--- cfe/trunk/cmake/caches/DistributionExample-stage2.cmake (original)
+++ cfe/trunk/cmake/caches/DistributionExample-stage2.cmake Wed Jun  5 10:35:38 2019
@@ -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 "")
 

Modified: cfe/trunk/cmake/caches/DistributionExample.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/cmake/caches/DistributionExample.cmake?rev=362624&r1=362623&r2=362624&view=diff
==============================================================================
--- cfe/trunk/cmake/caches/DistributionExample.cmake (original)
+++ cfe/trunk/cmake/caches/DistributionExample.cmake Wed Jun  5 10:35:38 2019
@@ -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




More information about the cfe-commits mailing list