From dd2ac7bd0caccd6dc99bbc3cee8d024386143b7a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 27 Sep 2021 17:09:42 +0200 Subject: [PATCH 1/4] all ninja call should be verbose --- debian/rules | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/debian/rules b/debian/rules index 02400782..3a375c2e 100755 --- a/debian/rules +++ b/debian/rules @@ -593,13 +593,13 @@ build_doc: cd $(CURDIR)/llvm/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man cd $(CURDIR)/clang/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man -(if test "$(OCAML_ENABLE)" = yes; then \ - ninja -C "$(TARGET_BUILD_STAGE2)" ocaml_doc; \ + ninja -C "$(TARGET_BUILD_STAGE2)" $(VERBOSE) ocaml_doc; \ fi) - ninja -C $(TARGET_BUILD_STAGE2) docs-llvm-html docs-clang-html docs-clang-tools-html docs-clang-tools-man docs-clang-man docs-llvm-man + ninja -C $(TARGET_BUILD_STAGE2) $(VERBOSE) docs-llvm-html docs-clang-html docs-clang-tools-html docs-clang-tools-man docs-clang-man docs-llvm-man ifeq (${POLLY_ENABLE},yes) - ninja -C $(TARGET_BUILD_STAGE2) docs-polly-html docs-polly-man + ninja -C $(TARGET_BUILD_STAGE2) $(VERBOSE) docs-polly-html docs-polly-man endif # Rename manpages @@ -717,9 +717,9 @@ endif rm -rf $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/build/utils/lit/lit/__pycache__/ \ $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/build/utils/lit/lit/*/__pycache__/ - DESTDIR=$(DEB_INST) ninja -C libcxxabi/build install - DESTDIR=$(DEB_INST) ninja -C libcxx/build install - DESTDIR=$(DEB_INST) ninja -C libclc/build install + DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C libcxxabi/build install + DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C libcxx/build install + DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C libclc/build install # Rename binaries mkdir -p $(DEB_INST)/usr/bin/ @@ -894,33 +894,33 @@ override_dh_auto_test: # LLVM tests ifneq (,$(findstring $(DEB_HOST_ARCH),$(ARCH_LLVM_TEST_OK))) # logs the output to check-llvm_build_log.txt for validation through autopkgtest - ninja -C $(TARGET_BUILD) stage2-check-llvm | tee check-llvm_build_log.txt + ninja $(VERBOSE) -C $(TARGET_BUILD) stage2-check-llvm | tee check-llvm_build_log.txt else - ninja -C $(TARGET_BUILD) stage2-check-llvm || true + ninja $(VERBOSE) -C $(TARGET_BUILD) stage2-check-llvm || true endif # Clang tests - ninja -C $(TARGET_BUILD) stage2-check-clang || true + ninja $(VERBOSE) -C $(TARGET_BUILD) stage2-check-clang || true # Clang extra tests (ex: clang-tidy) - ninja -C $(TARGET_BUILD_STAGE2) check-clang-tools || true + ninja $(VERBOSE) -C $(TARGET_BUILD_STAGE2) check-clang-tools || true # LLD tests ifeq (${LLD_ENABLE},yes) - ninja -C $(TARGET_BUILD_STAGE2) check-lld || true + ninja $(VERBOSE) -C $(TARGET_BUILD_STAGE2) check-lld || true endif # Sanitizer - ninja -C $(TARGET_BUILD_STAGE2) check-sanitizer || true + ninja $(VERBOSE) -C $(TARGET_BUILD_STAGE2) check-sanitizer || true # Libcxx - ninja -C libcxx/build check-libcxx || true + ninja $(VERBOSE) -C libcxx/build check-libcxx || true # Libcxxabi - ninja -C libcxxabi/build check-libcxxabi || true + ninja $(VERBOSE) -C libcxxabi/build check-libcxxabi || true # Libclc - ninja -C libclc/build test || true + ninja $(VERBOSE) -C libclc/build test || true # LLDB tests ifeq (,$(filter $(DEB_HOST_ARCH), $(LLDB_DISABLE_ARCHS) armhf armel)) @@ -931,7 +931,7 @@ ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS))) ln -s lldb/_lldb.so; \ fi if test "$(CODECOVERAGE)" = "no"; then \ - LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/$(TARGET_BUILD)/lib/ ninja -C $(TARGET_BUILD) check-lldb || true; \ + LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/$(TARGET_BUILD)/lib/ ninja $(VERBOSE) -C $(TARGET_BUILD) check-lldb || true; \ fi # remove the workaround rm $(CURDIR)/$(TARGET_BUILD)/lib/python*/*-packages/_lldb.so From 15c7d95715ef348589a2897e80c1cac118a0282a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 27 Sep 2021 17:09:53 +0200 Subject: [PATCH 2/4] remove make legacy --- debian/rules | 5 ----- 1 file changed, 5 deletions(-) diff --git a/debian/rules b/debian/rules index 3a375c2e..6ad406e6 100755 --- a/debian/rules +++ b/debian/rules @@ -457,13 +457,8 @@ override_dh_auto_configure: preconfigure fi -ifeq (Ninja, $(GENERATOR)) # ninja VERBOSE=-v -else -# make -VERBOSE=VERBOSE=1 -endif debian-full-build: $(PRE_PROCESS) ninja $(NJOBS) -C $(TARGET_BUILD) $(VERBOSE) stage2 From 2b9b171e95185a538a645b43ecc3892579a3ceea Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Wed, 29 Sep 2021 18:49:32 +0200 Subject: [PATCH 3/4] Disable libunwind on sparc, sparc64 and x32 --- debian/changelog | 7 +++++++ debian/control | 4 ++-- debian/rules | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0776e319..6c75e5cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-12 (1:12.0.1-10) UNRELEASED; urgency=medium + + [ John Paul Adrian Glaubitz ] + * Disable libunwind on sparc, sparc64 and x32 + + -- John Paul Adrian Glaubitz Wed, 29 Sep 2021 18:48:35 +0200 + llvm-toolchain-12 (1:12.0.1-9) unstable; urgency=medium * Replace make by ninja for the build process diff --git a/debian/control b/debian/control index d433c2a8..9294f7d4 100644 --- a/debian/control +++ b/debian/control @@ -723,7 +723,7 @@ Description: OpenCL C language implementation - development files Package: libunwind-12 Section: libs -Architecture: amd64 arm64 armhf i386 mips64el ppc64el ppc64 riscv64 sparc sparc64 +Architecture: amd64 arm64 armhf i386 mips64el ppc64el ppc64 riscv64 Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends} @@ -740,7 +740,7 @@ Description: production-quality unwinder Package: libunwind-12-dev Section: libdevel -Architecture: amd64 arm64 armhf i386 mips64el ppc64el ppc64 riscv64 sparc sparc64 +Architecture: amd64 arm64 armhf i386 mips64el ppc64el ppc64 riscv64 Multi-Arch: same Depends: ${misc:Depends}, diff --git a/debian/rules b/debian/rules index 6ad406e6..a8e6dec4 100755 --- a/debian/rules +++ b/debian/rules @@ -197,7 +197,7 @@ endif # Enable libunwind (or not) LIBUNWIND_ENABLE=yes -ifneq (,$(filter $(DEB_HOST_ARCH), s390x armel mipsel hurd-i386 powerpc)) +ifneq (,$(filter $(DEB_HOST_ARCH), s390x armel mipsel hurd-i386 powerpc sparc sparc64 x32)) LIBUNWIND_ENABLE=no else PROJECTS += ;libunwind From 6da834fd4a274d7fa1d780d7387e59d48a36ee73 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 2 Oct 2021 10:50:37 +0200 Subject: [PATCH 4/4] If parallel is not set in DEB_BUILD_OPTIONS, use nproc --- debian/changelog | 4 +++- debian/rules | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6c75e5cc..4c68c702 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,11 @@ llvm-toolchain-12 (1:12.0.1-10) UNRELEASED; urgency=medium + * If parallel is not set in DEB_BUILD_OPTIONS, use nproc + [ John Paul Adrian Glaubitz ] * Disable libunwind on sparc, sparc64 and x32 - -- John Paul Adrian Glaubitz Wed, 29 Sep 2021 18:48:35 +0200 + -- Sylvestre Ledru Sat, 02 Oct 2021 10:50:27 +0200 llvm-toolchain-12 (1:12.0.1-9) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index a8e6dec4..c994960b 100755 --- a/debian/rules +++ b/debian/rules @@ -24,6 +24,8 @@ SONAME_OPENMP := 5 DEBIAN_REVISION := $(shell dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\3,p") ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) +else + NJOBS := $(shell nproc) endif VENDOR=$(shell lsb_release -is)