================
@@ -90,9 +88,17 @@ else()
   set(CLANG_BOOTSTRAP_TARGETS ${LLVM_RELEASE_FINAL_STAGE_TARGETS} CACHE STRING 
"")
 endif()
 
+if (LLVM_RELEASE_ENABLE_LTO)
+  # Enable LTO for the runtimes.  We need to configure stage1 clang to default
+  # to using lld as the linker because the stage1 toolchain will be used to
+  # build and link the runtimes.
+  set(RUNTIMES_CMAKE_ARGS "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON 
-DLLVM_ENABLE_LLD=ON" CACHE STRING "")
----------------
tru wrote:

Is there a reason we can't use `LLVM_ENABLE_LTO=Thin` here? It would be more 
explicit that we enable ThinLTO over whatever CMake deems good in that case.

https://github.com/llvm/llvm-project/pull/127268
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to