Try to disable some options specific to BOOTSTRAP_LLVM_ENABLE_LTO which aren't activated for LLVM_ENABLE_LTO causing the usage of llvm-ar llvm-ranlib. Causing a huge increase of the size of the .deb (because of .a and .so) and issues in the libs (Closes: #939472)

This commit is contained in:
Sylvestre Ledru 2019-09-06 23:27:38 +02:00
parent 0e69053baa
commit c6417dbaef
3 changed files with 32 additions and 0 deletions

10
debian/changelog vendored
View File

@ -1,3 +1,13 @@
llvm-toolchain-9 (1:9~+rc3-1~exp3) experimental; urgency=medium
* Try to disable some options specific to BOOTSTRAP_LLVM_ENABLE_LTO
which aren't activated for LLVM_ENABLE_LTO causing the usage
of llvm-ar llvm-ranlib. Causing a huge increase of the size
of the .deb (because of .a and .so) and issues in the libs
(Closes: #939472)
-- Sylvestre Ledru <sylvestre@debian.org> Fri, 06 Sep 2019 23:27:28 +0200
llvm-toolchain-9 (1:9~+rc3-1~exp2) experimental; urgency=medium
* Debian moved to gcc-9. This gcc version now refuses -flto="Thin"

View File

@ -129,3 +129,4 @@ bootstrap-fix-include-next.diff
clang-riscv64-multiarch.diff
clang-riscv64-rv64gc.diff
try-to-unbreak-thinlto.diff

View File

@ -0,0 +1,21 @@
Index: llvm-toolchain-9-9~+rc3/clang/CMakeLists.txt
===================================================================
--- llvm-toolchain-9-9~+rc3.orig/clang/CMakeLists.txt
+++ llvm-toolchain-9-9~+rc3/clang/CMakeLists.txt
@@ -719,11 +719,11 @@ if (CLANG_ENABLE_BOOTSTRAP)
if(BOOTSTRAP_LLVM_ENABLE_LLD)
set(${CLANG_STAGE}_LINKER -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/ld.lld)
endif()
- if(NOT BOOTSTRAP_LLVM_ENABLE_LTO)
- add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
- set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar)
- set(${CLANG_STAGE}_RANLIB -DCMAKE_RANLIB=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib)
- endif()
+# if(NOT BOOTSTRAP_LLVM_ENABLE_LTO)
+# add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
+# set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar)
+# set(${CLANG_STAGE}_RANLIB -DCMAKE_RANLIB=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib)
+# endif()
add_dependencies(clang-bootstrap-deps llvm-objcopy llvm-strip)
set(${CLANG_STAGE}_OBJCOPY -DCMAKE_OBJCOPY=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-objcopy)
set(${CLANG_STAGE}_STRIP -DCMAKE_STRIP=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-strip)