From 19e475ab5705028ae18112bb859938bbd53a6346 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 18 Sep 2017 19:59:47 +0000 Subject: [PATCH] * Ship liblldMinGW lld lib * Ship clang-refactor in clang-X.Y * build using gold on arm64 and s390x. For backports, arm64 might still need the BFD linker, and building with only one or two processes in parallel. * On amd64, s390x, arm64 and ppc64el, build with -g1 instead of -g. * Set CMAKE_CXX_FLAGS_RELWITHDEBINFO and pass opt_flags. --- debian/changelog | 11 ++++++++--- debian/control | 4 ++++ debian/rules | 6 +++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0a113fe6..c3715b91 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,13 +1,18 @@ llvm-toolchain-snapshot (1:6.0~svn311834-4) UNRELEASED; urgency=medium + * Ship liblldMinGW lld lib + * Ship clang-refactor in clang-X.Y + [ Gianfranco Costamagna ] * Enable ocaml on release architectures. [ Matthias Klose ] * Link with --no-keep-files-mapped --no-map-whole-files when using gold. - - * ship liblldMinGW lld lib - * ship clang-refactor in clang-X.Y + * build using gold on arm64 and s390x. For backports, arm64 might still + need the BFD linker, and building with only one or two processes in + parallel. + * On amd64, s390x, arm64 and ppc64el, build with -g1 instead of -g. + * Set CMAKE_CXX_FLAGS_RELWITHDEBINFO and pass opt_flags. -- Sylvestre Ledru Mon, 11 Sep 2017 22:27:20 +0200 diff --git a/debian/control b/debian/control index f665b6fe..f9cbaaa0 100644 --- a/debian/control +++ b/debian/control @@ -229,6 +229,8 @@ Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same +Breaks: libllvm3.9v4 +Replaces: libllvm3.9v4 Description: Modular compiler and toolchain technologies, runtime library LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, just-in-time code generators, and many other @@ -243,6 +245,8 @@ Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm6.0 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same +Breaks: libllvm3.9v4-dbg +Replaces: libllvm3.9v4-dbg Description: Modular compiler and toolchain technologies, debugging libraries LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, just-in-time code generators, and many other diff --git a/debian/rules b/debian/rules index 25a456d2..6e5890a4 100755 --- a/debian/rules +++ b/debian/rules @@ -61,6 +61,9 @@ export CC=gcc-$(GCC_VERSION) export CXX=g++-$(GCC_VERSION) opt_flags = -g -O2 +ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 ppc64el s390x)) + opt_flags = -g1 -O2 +endif ifneq (,$(findstring $(DEB_HOST_ARCH),armel)) opt_flags += -marm # 3.8 fails to build, disable the compiler_rt builtins @@ -81,7 +84,7 @@ else control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev' endif -BINUTILS_GOLD_ARCHS := amd64 armhf i386 powerpcspe ppc64 ppc64el sparc sparc64 x32 +BINUTILS_GOLD_ARCHS := amd64 arm64 armhf i386 powerpcspe ppc64 ppc64el sparc sparc64 x32 s390x ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.23.1-1~exp3 ; echo $$?),0) ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) # -fused-ld=gold enables the gold linker (but is not supported by all archs / distro) @@ -275,6 +278,7 @@ override_dh_auto_configure: preconfigure -DCMAKE_INSTALL_PREFIX=/usr/lib/llvm-$(LLVM_VERSION) \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(opt_flags)" \ -DCMAKE_CXX_FLAGS='$(CXXFLAGS_EXTRA)' \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_INSTALL_UTILS=ON \