From 6bf47964c143937a371f725d37e01ba01fc28e63 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 30 Nov 2021 19:33:13 +0100 Subject: [PATCH 01/22] Rebuild to workaround the coinstallability issue (Closes: #996858) --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index ac32c824..2078d2a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-12 (1:12.0.1-17) unstable; urgency=medium + + * Rebuild to workaround the coinstallability issue (Closes: #996858) + + -- Sylvestre Ledru Tue, 30 Nov 2021 19:32:51 +0100 + llvm-toolchain-12 (1:12.0.1-16) unstable; urgency=medium [ Erik Maciejewski ] From 544180d01cea7c94c14ebedc01568938f90e3179 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 16 Dec 2021 17:49:47 +0100 Subject: [PATCH 02/22] Unbreak llvm-toolchain-12 on buster. -fuse-ld=gold wasn't passed to compiler-rt. it was using bfd. And binutils shipping in buster has a bug preventing this to work: https://github.com/llvm/llvm-project/issues/42339 --- debian/changelog | 9 ++++++++ debian/patches/series | 2 ++ .../use-gold-for-compiler-rt-when-set.diff | 22 +++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 debian/patches/use-gold-for-compiler-rt-when-set.diff diff --git a/debian/changelog b/debian/changelog index 2078d2a2..7d4a6616 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +llvm-toolchain-12 (1:12.0.1-18) unstable; urgency=medium + + * Unbreak llvm-toolchain-12 on buster. + -fuse-ld=gold wasn't passed to compiler-rt. it was using bfd. + And binutils shipping in buster has a bug preventing this to work: + https://github.com/llvm/llvm-project/issues/42339 + + -- Sylvestre Ledru Thu, 16 Dec 2021 17:49:22 +0100 + llvm-toolchain-12 (1:12.0.1-17) unstable; urgency=medium * Rebuild to workaround the coinstallability issue (Closes: #996858) diff --git a/debian/patches/series b/debian/patches/series index b705399e..0586e162 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -149,3 +149,5 @@ libcxx-libatomic-only-with-gcc-rtlib.diff libcxxabi-fix-link-builtins.diff llvm-runtimes-builtins-build-check.diff compilerrt-builtins-arch-fix-armhf.diff +use-gold-for-compiler-rt-when-set.diff + diff --git a/debian/patches/use-gold-for-compiler-rt-when-set.diff b/debian/patches/use-gold-for-compiler-rt-when-set.diff new file mode 100644 index 00000000..cb9537e0 --- /dev/null +++ b/debian/patches/use-gold-for-compiler-rt-when-set.diff @@ -0,0 +1,22 @@ +Index: llvm-toolchain-13-13.0.1~+rc1/llvm/runtimes/CMakeLists.txt +=================================================================== +--- llvm-toolchain-13-13.0.1~+rc1.orig/llvm/runtimes/CMakeLists.txt ++++ llvm-toolchain-13-13.0.1~+rc1/llvm/runtimes/CMakeLists.txt +@@ -244,6 +244,8 @@ function(runtime_default_target) + -DCMAKE_ASM_COMPILER_WORKS=ON + ${RUNTIMES_CMAKE_ARGS} + PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES ++ LLVM_USE_LLD ++ LLVM_USE_LINKER + ${ARG_PREFIXES} + EXTRA_TARGETS ${extra_targets} + ${test_targets} +@@ -345,6 +347,8 @@ function(runtime_register_target name ta + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON + -DLLVM_RUNTIMES_TARGET=${name} + ${${name}_extra_args} ++ PASSTHROUGH_PREFIXES LLVM_USE_LLD ++ LLVM_USE_LINKER + EXTRA_TARGETS ${${name}_extra_targets} + ${${name}_test_targets} + USE_TOOLCHAIN From 000d58d4e13f46798d392dd2196579a21e47ad23 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 11 Jan 2022 23:45:18 +0100 Subject: [PATCH 03/22] remove the typo -DLVVM_ENABLE_ZLIB=OFF as it seems that it working with the default value --- debian/rules | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/rules b/debian/rules index 0d4a140f..6467e61e 100755 --- a/debian/rules +++ b/debian/rules @@ -487,7 +487,6 @@ override_dh_auto_configure: preconfigure -DLLVM_ENABLE_RUNTIMES="$(RUNTIMES_LIST)" \ -DLLVM_ENABLE_PIC=ON \ -DLLVM_ENABLE_RTTI=ON \ - -DLVVM_ENABLE_ZLIB=OFF \ -DLLVM_BUILD_DOCS=OFF \ -DLLVM_INCLUDE_GO_TESTS=OFF \ -DLLVM_USE_RELATIVE_PATHS_IN_FILES=ON \ From 7532cc6947820daf248de001f923931eada6d40a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 21 Jan 2022 00:13:00 +0100 Subject: [PATCH 04/22] Rename ocaml-nox => ocaml-base (Closes: #1002608) --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7d4a6616..2ac2a6e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ llvm-toolchain-12 (1:12.0.1-18) unstable; urgency=medium -fuse-ld=gold wasn't passed to compiler-rt. it was using bfd. And binutils shipping in buster has a bug preventing this to work: https://github.com/llvm/llvm-project/issues/42339 + * Rename ocaml-nox => ocaml-base (Closes: #1002608) -- Sylvestre Ledru Thu, 16 Dec 2021 17:49:22 +0100 diff --git a/debian/control b/debian/control index d12af64a..760e06c7 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ Build-Depends: debhelper (>= 9.0), cmake, ninja-build, g++-multilib [amd64 i386 kfreebsd-amd64 mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], libjs-mathjax, python3-recommonmark, doxygen, gfortran, - ocaml-nox [amd64 arm64 armhf ppc64el riscv64 s390x], + ocaml-base [amd64 arm64 armhf ppc64el riscv64 s390x] | ocaml-nox [amd64 arm64 armhf ppc64el riscv64 s390x], ocaml-findlib [amd64 arm64 armhf ppc64el riscv64 s390x], libctypes-ocaml-dev [amd64 arm64 armhf ppc64el riscv64 s390x], dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el riscv64 s390x], From 3c830a56b4b4ec57634df13ee1085106c83c8f04 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 21 Jan 2022 15:19:47 +0100 Subject: [PATCH 05/22] Remove Build-Conflicts: ocaml --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 2ac2a6e5..c3f0b452 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ llvm-toolchain-12 (1:12.0.1-18) unstable; urgency=medium And binutils shipping in buster has a bug preventing this to work: https://github.com/llvm/llvm-project/issues/42339 * Rename ocaml-nox => ocaml-base (Closes: #1002608) + * Remove Build-Conflicts: ocaml -- Sylvestre Ledru Thu, 16 Dec 2021 17:49:22 +0100 diff --git a/debian/control b/debian/control index 760e06c7..48d3f218 100644 --- a/debian/control +++ b/debian/control @@ -25,7 +25,7 @@ Build-Depends: debhelper (>= 9.0), cmake, ninja-build, llvm-spirv [ amd64 arm64 armel armhf mips64el mipsel ppc64el s390x ] | hello [!i386], spirv-tools [ linux-any ] | hello [ !i386] # "| hello" is for older buster/bionic distros without spirv support -Build-Conflicts: oprofile, ocaml +Build-Conflicts: oprofile Standards-Version: 4.2.1 Homepage: https://www.llvm.org/ Vcs-Git: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain.git -b snapshot From 436ebce633afe16e4337a9845f86043b8033a9cc Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 23 Jan 2022 22:52:21 +0100 Subject: [PATCH 06/22] add some workaround for stretch --- debian/rules | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 6467e61e..e9963f7a 100755 --- a/debian/rules +++ b/debian/rules @@ -664,7 +664,7 @@ override_dh_auto_install: # Clean up temporary files to make sure the install works rm -rf $(find $(TARGET_BUILD) -wholename '*CMakeFiles*' -not -name CMakeLists.txt -a -name "*.dir" -type d) # install/fast enables a make install without recompiling temporary files - DESTDIR=$(DEB_INST)/ ninja -C $(TARGET_BUILD) $(VERBOSE) stage2-install + LD_LIBRARY_PATH=$(STAGE_2_LIB_DIR) DESTDIR=$(DEB_INST)/ ninja -C $(TARGET_BUILD) $(VERBOSE) stage2-install # Not used on Linux. rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin/argdumper @@ -978,6 +978,9 @@ override_dh_auto_test: endif +override_dh_testroot: + # Override for Debian stretch + override_dh_gencontrol: dh_gencontrol -- $(control_vars) From a4acb94c9e35509577b4b0680445a5d472b5729a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 24 Jan 2022 16:24:04 +0100 Subject: [PATCH 07/22] also propose to install mlir --- debian/qualify-clang.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 97989bdc..4d9bc2df 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -9,7 +9,7 @@ VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9]+).*,\1,p") DETAILED_VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1\2\3,p") DEB_HOST_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH) -LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clangd-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}_${DETAILED_VERSION}_amd64.deb clang-tidy-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclc-${VERSION}_${DETAILED_VERSION}_all.deb libclc-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}-linker-tools_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb" +LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python3-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clangd-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}_${DETAILED_VERSION}_amd64.deb clang-tidy-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-cpp${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclc-${VERSION}_${DETAILED_VERSION}_all.deb libclc-${VERSION}-dev_${DETAILED_VERSION}_all.deb llvm-${VERSION}-linker-tools_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}_${DETAILED_VERSION}_amd64.deb libunwind-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}_${DETAILED_VERSION}_amd64.deb libmlir-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb" echo "To install everything:" echo "sudo apt --purge remove 'libomp5-*' 'libc++*dev' 'libc++*' 'python3-lldb-*' 'libunwind-*' 'libclc-*' 'libclc-*dev'" echo "sudo dpkg -i $LIST" From d40883179104fa30787bdd018cfd0a27f13541f8 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 24 Jan 2022 19:43:17 +0100 Subject: [PATCH 08/22] remove workaround --- debian/rules | 3 --- 1 file changed, 3 deletions(-) diff --git a/debian/rules b/debian/rules index e9963f7a..c9668972 100755 --- a/debian/rules +++ b/debian/rules @@ -978,9 +978,6 @@ override_dh_auto_test: endif -override_dh_testroot: - # Override for Debian stretch - override_dh_gencontrol: dh_gencontrol -- $(control_vars) From 34fe63ca7e8955521d5e329a97e7fd4f40bbecc8 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Jan 2022 00:21:12 +0100 Subject: [PATCH 09/22] stretch: try to set the ld_library_path --- debian/rules | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/rules b/debian/rules index c9668972..120d97d5 100755 --- a/debian/rules +++ b/debian/rules @@ -92,6 +92,11 @@ ifneq (,$(filter $(DEB_HOST_ARCH),sparc sparc64)) STAGE_1_CMAKE_EXTRA += -DLLVM_PARALLEL_LINK_JOBS=4 endif +ifneq (,$(filter $(DISTRO),stretch)) +# Help to find the fakeroot path + export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):/usr/lib/x86_64-linux-gnu/libfakeroot/ +endif + ifneq (,$(filter $(DEB_HOST_ARCH),i386 armel mipsel powerpc powerpcspe riscv64)) # For some reason, in the stage2 build, when clang is used to compile # itself. The atomic detection is failing on armel and riscv64. Forcing the inclusion @@ -392,6 +397,8 @@ preconfigure: @echo "LLVM_VERSION=$(LLVM_VERSION)" @echo "LLVM_VERSION_FULL=$(LLVM_VERSION_FULL)" @echo "LLVM_VERSION_SNAPSHOT=$(LLVM_VERSION_SNAPSHOT)" + @echo "PATH=$(PATH)" + @echo "LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)" for f in debian/*.in; do \ f2=$$(echo $$f | sed 's/\.in$$//;s/X\.Y/$(LLVM_VERSION)/'); \ From 0322ecc9db66ce89b3a4066a7679f705f881acac Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Jan 2022 00:33:13 +0100 Subject: [PATCH 10/22] stretch: try to set the ld_library_path --- debian/rules | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 120d97d5..8af27a05 100755 --- a/debian/rules +++ b/debian/rules @@ -1,3 +1,4 @@ + #!/usr/bin/make -f # polly & lldb aren't enabled for every platform @@ -94,7 +95,7 @@ endif ifneq (,$(filter $(DISTRO),stretch)) # Help to find the fakeroot path - export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):/usr/lib/x86_64-linux-gnu/libfakeroot/ + export LD_LIBRARY_PATH := $$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/libfakeroot/ endif ifneq (,$(filter $(DEB_HOST_ARCH),i386 armel mipsel powerpc powerpcspe riscv64)) From f1e99fac32a1f546a29612df2ffe4bda1ed985d7 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Jan 2022 00:43:11 +0100 Subject: [PATCH 11/22] Revert "stretch: try to set the ld_library_path" This reverts commit 0322ecc9db66ce89b3a4066a7679f705f881acac. --- debian/rules | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 8af27a05..120d97d5 100755 --- a/debian/rules +++ b/debian/rules @@ -1,4 +1,3 @@ - #!/usr/bin/make -f # polly & lldb aren't enabled for every platform @@ -95,7 +94,7 @@ endif ifneq (,$(filter $(DISTRO),stretch)) # Help to find the fakeroot path - export LD_LIBRARY_PATH := $$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/libfakeroot/ + export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):/usr/lib/x86_64-linux-gnu/libfakeroot/ endif ifneq (,$(filter $(DEB_HOST_ARCH),i386 armel mipsel powerpc powerpcspe riscv64)) From 227598dbc7b884aa22efdeaa67b13d174dafe767 Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Sat, 29 Jan 2022 02:28:13 +0000 Subject: [PATCH 12/22] Build clangd remote index (grpc & protobuf dependency) --- debian/control | 3 ++- debian/rules | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 48d3f218..a538a82d 100644 --- a/debian/control +++ b/debian/control @@ -23,7 +23,8 @@ Build-Depends: debhelper (>= 9.0), cmake, ninja-build, dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el riscv64 s390x], libpfm4-dev [linux-any], python3-setuptools, libz3-dev, llvm-spirv [ amd64 arm64 armel armhf mips64el mipsel ppc64el s390x ] | hello [!i386], - spirv-tools [ linux-any ] | hello [ !i386] + spirv-tools [ linux-any ] | hello [ !i386], + libgrpc++-dev, libprotobuf-dev, protobuf-compiler, protobuf-compiler-grpc # "| hello" is for older buster/bionic distros without spirv support Build-Conflicts: oprofile Standards-Version: 4.2.1 diff --git a/debian/rules b/debian/rules index 120d97d5..5a325b6c 100755 --- a/debian/rules +++ b/debian/rules @@ -125,6 +125,18 @@ ZARCH=z13 endif STAGE_2_CMAKE_EXTRA += -DCLANG_SYSTEMZ_DEFAULT_ARCH=$(ZARCH) +# clangd remote index support requires GRPC & protobuf. +# Enable if minimum tested versions are available. +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' libgrpc++-dev) gt 1.30.0; echo $$?),0) +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' protobuf-compiler-grpc) gt 1.30.0; echo $$?),0) +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' libprotobuf-dev) gt 3.12.0; echo $$?),0) +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' protobuf-compiler) gt 3.12.0; echo $$?),0) +STAGE_2_CMAKE_EXTRA += -DCLANGD_ENABLE_REMOTE=ON +endif +endif +endif +endif + export CC=gcc-$(GCC_VERSION) export CXX=g++-$(GCC_VERSION) From fc08151d52c60840ae11b437d218896e83e3cc09 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 29 Jan 2022 10:17:47 +0100 Subject: [PATCH 13/22] Build clangd with GRPC support Thanks to Sam McCall for the patch --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index c3f0b452..03c3c6db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-12 (1:12.0.1-19) UNRELEASED; urgency=medium + + * Build clangd with GRPC support + Thanks to Sam McCall for the patch + + -- Sylvestre Ledru Sat, 29 Jan 2022 10:17:38 +0100 + llvm-toolchain-12 (1:12.0.1-18) unstable; urgency=medium * Unbreak llvm-toolchain-12 on buster. From 87ee3c332f9b0736064a588bdf974bbda0288d58 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 29 Jan 2022 14:47:09 +0100 Subject: [PATCH 14/22] remove unused clangd lib --- debian/rules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/rules b/debian/rules index 5a325b6c..980d0cad 100755 --- a/debian/rules +++ b/debian/rules @@ -695,6 +695,9 @@ override_dh_auto_install: # Remove an example - introduced in https://reviews.llvm.org/D61446 rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libBye.a + # Remove unused clangd lib + rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libRemoteIndexProto.a $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libRemoteIndexServiceProto.a + cp $(TARGET_BUILD_STAGE2)/bin/clang-query $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin # Only run on executable, not script From 54211bf71a6c919b6dae425cbebf654b57b9ec30 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 3 Feb 2022 10:22:04 +0100 Subject: [PATCH 15/22] New stable release --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2b3babb5..f6a69dfe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-13 (1:13.0.1-1) unstable; urgency=medium + + * New stable release + + -- Sylvestre Ledru Thu, 03 Feb 2022 10:21:56 +0100 + llvm-toolchain-13 (1:13.0.1~+rc3-1~exp1) experimental; urgency=medium [ Samuel Thibault ] From 5f3e4c613adcaa27f3b79112924819483283103f Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 3 Feb 2022 10:28:12 +0100 Subject: [PATCH 16/22] update of the doc --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index f6a69dfe..bf970bbf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +llvm-toolchain-snapshot (1:14~++20220105112135+cdbad62c526c-1~exp1) UNRELEASED; urgency=medium + + * experimental New snapshot release + * experimental New snapshot release + * experimental New snapshot release + + -- Sylvestre Ledru Wed, 05 Jan 2022 23:21:56 +0100 + llvm-toolchain-13 (1:13.0.1-1) unstable; urgency=medium * New stable release From 703a74bdd08931b638385b26ffeeee57bbbc2f93 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 3 Feb 2022 10:31:23 +0100 Subject: [PATCH 17/22] update of the doc --- debian/orig-tar.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh index 4e5acdec..e277ad08 100755 --- a/debian/orig-tar.sh +++ b/debian/orig-tar.sh @@ -1,15 +1,6 @@ #!/bin/sh -# This script will create the following tarballs: -# llvm-toolchain-snapshot-3.2_3.2repack.orig-clang.tar.bz2 -# llvm-toolchain-snapshot-3.2_3.2repack.orig-clang-extra.tar.bz2 -# llvm-toolchain-snapshot-3.2_3.2repack.orig-compiler-rt.tar.bz2 -# llvm-toolchain-snapshot-3.2_3.2repack.orig-lld.tar.bz2 -# llvm-toolchain-snapshot-3.2_3.2repack.orig-lldb.tar.bz2 -# llvm-toolchain-snapshot-3.2_3.2repack.orig-polly.tar.bz2 -# llvm-toolchain-snapshot-3.2_3.2repack.orig-openmp.tar.bz2 -# llvm-toolchain-snapshot-3.2_3.2repack.orig-libcxx.tar.bz2 -# llvm-toolchain-snapshot-3.2_3.2repack.orig-libcxxabi.tar.bz2 -# llvm-toolchain-snapshot-3.2_3.2repack.orig.tar.bz2 +# This script will create the following tarball: +# llvm-toolchain-XX_XX\~+20200120101212+de4b2a7fad6.orig.tar.xz set -e From 5b9901950fb5084518169360f22b8b714a7ecf26 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 4 Feb 2022 09:46:30 +0100 Subject: [PATCH 18/22] Fix VCS fields --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index a538a82d..0529f4c4 100644 --- a/debian/control +++ b/debian/control @@ -29,8 +29,8 @@ Build-Depends: debhelper (>= 9.0), cmake, ninja-build, Build-Conflicts: oprofile Standards-Version: 4.2.1 Homepage: https://www.llvm.org/ -Vcs-Git: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain.git -b snapshot -Vcs-Browser: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/tree/snapshot +Vcs-Git: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain.git -b 12 +Vcs-Browser: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/tree/12 # ------------- clang ------------- From 3d36be737bf3e96f7369cccbae5ddbbb1c5b3e33 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 4 Feb 2022 09:46:48 +0100 Subject: [PATCH 19/22] Fix VCS fields --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 421b04ff..2a7c56ad 100644 --- a/debian/control +++ b/debian/control @@ -28,8 +28,8 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, Build-Conflicts: oprofile Standards-Version: 4.2.1 Homepage: https://www.llvm.org/ -Vcs-Git: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain.git -b snapshot -Vcs-Browser: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/tree/snapshot +Vcs-Git: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain.git -b 13 +Vcs-Browser: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/tree/13 # ------------- clang ------------- From b990b953f02c37cd9de639a6652d7df70b3038ad Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 5 Feb 2022 11:08:21 +0100 Subject: [PATCH 20/22] mlir: use the cmake option to avoid installing object files MLIR_INSTALL_AGGREGATE_OBJECTS Closes upstream #53134 --- debian/changelog | 8 ++++---- debian/rules | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index bf970bbf..042854ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -llvm-toolchain-snapshot (1:14~++20220105112135+cdbad62c526c-1~exp1) UNRELEASED; urgency=medium +llvm-toolchain-13 (1:13.0.1-2) unstable; urgency=medium - * experimental New snapshot release - * experimental New snapshot release - * experimental New snapshot release + * mlir: use the cmake option to avoid installing object files + MLIR_INSTALL_AGGREGATE_OBJECTS + Closes upstream #53134 -- Sylvestre Ledru Wed, 05 Jan 2022 23:21:56 +0100 diff --git a/debian/rules b/debian/rules index 0eab5664..5d51b4ba 100755 --- a/debian/rules +++ b/debian/rules @@ -262,6 +262,10 @@ ifeq ($(LIBUNWIND_ENABLE),yes) endif endif +# Do not install objects +STAGE_ALL_CMAKE_EXTRA += -DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF + + RUN_TEST=yes ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) RUN_TEST=no @@ -687,9 +691,6 @@ override_dh_auto_install: # Remove an example - introduced in https://reviews.llvm.org/D61446 rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libBye.a - # should not be installed (mlir) - rm -rf $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/objects-Release/ - cp $(TARGET_BUILD_STAGE2)/bin/clang-query $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin # Only run on executable, not script From e2608ac4086148b7201b8a11c744819529390330 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 5 Feb 2022 11:11:35 +0100 Subject: [PATCH 21/22] fix changelog --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7fecb263..25e5ba51 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ llvm-toolchain-13 (1:13.0.1-2) unstable; urgency=medium * mlir: use the cmake option to avoid installing object files MLIR_INSTALL_AGGREGATE_OBJECTS Closes upstream #53134 + * Build clangd with GRPC support + Thanks to Sam McCall for the patch -- Sylvestre Ledru Wed, 05 Jan 2022 23:21:56 +0100 From 0819620085625283746b05fb1902bbead3b5efa0 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 5 Feb 2022 12:46:35 +0100 Subject: [PATCH 22/22] remove one of the clangd lib --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index cad7f5a5..10dbf4ba 100755 --- a/debian/rules +++ b/debian/rules @@ -706,7 +706,7 @@ override_dh_auto_install: rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libBye.a # Remove unused clangd lib - rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libRemoteIndexProto.a $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libRemoteIndexServiceProto.a + rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libRemoteIndexProto.a $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libRemoteIndexServiceProto.a $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libMonitoringServiceProto.a cp $(TARGET_BUILD_STAGE2)/bin/clang-query $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin