[PATCH] D62279: Use LTO capable linker

Wink Saville via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 22 18:32:11 PDT 2019


winksaville created this revision.
winksaville added a reviewer: beanz.
Herald added subscribers: cfe-commits, dexonsmith, inglorion, mehdi_amini, mgorny.
Herald added a project: clang.

In DistributionExample.cmake be sure we use a LTO
capable linker, the easiest to choose is lld.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62279

Files:
  clang/cmake/caches/DistributionExample.cmake


Index: clang/cmake/caches/DistributionExample.cmake
===================================================================
--- clang/cmake/caches/DistributionExample.cmake
+++ clang/cmake/caches/DistributionExample.cmake
@@ -17,6 +17,11 @@
 # 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62279.200858.patch
Type: text/x-patch
Size: 592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190523/4ef2ff2f/attachment.bin>


More information about the cfe-commits mailing list