From de4010878c9de22ca2dde568852d725fa0e4f996 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Sun, 8 Oct 2023 08:14:00 +0200 Subject: [PATCH] [ Matthias Klose ] * Consolidate the build flags for the wasm builds. * Disable the clc and wasm builds when not building binary indep packages. * Limit the parallel links to 2 on riscv64. --- debian/changelog | 8 +++++++- debian/rules | 21 ++++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4a6eaff4..03a1937d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,18 @@ llvm-toolchain-snapshot (1:18~++20230921012857+4cf8da94198d-1~exp1) UNRELEASED; urgency=medium + [ Sylvestre Ledru ] * replace python3-recommonmark by myst-parser to follow upstream change b7ff03206d668cd5a620a9d4e1b22ea112ed56e3 And disable generation of the doc on old distro * Also install readtapi => llvm-readtapi symlink * Ship tblgen-to-irdl as part of mlir-tools - -- Sylvestre Ledru Mon, 25 Sep 2023 21:51:52 +0200 + [ Matthias Klose ] + * Consolidate the build flags for the wasm builds. + * Disable the clc and wasm builds when not building binary indep packages. + * Limit the parallel links to 2 on riscv64. + + -- Matthias Klose Sun, 08 Oct 2023 08:10:51 +0200 llvm-toolchain-snapshot (1:18~++20230910052457+7560356a832f-1~exp1) experimental; urgency=medium diff --git a/debian/rules b/debian/rules index 60716398..a5540cd9 100755 --- a/debian/rules +++ b/debian/rules @@ -195,6 +195,7 @@ endif # debug symbols OOM in Ubuntu Ubuntu and slows down build process. ifneq (,$(filter $(DEB_HOST_ARCH),riscv64)) opt_flags = -O2 -DNDEBUG -g0 + STAGE_ALL_CMAKE_EXTRA += -DLLVM_PARALLEL_LINK_JOBS=2 else opt_flags = -O2 -DNDEBUG -g1 endif @@ -829,8 +830,8 @@ endif touch $@ # Remove some new flags introduced by dpkg 1.22.0; -STAGE_2_WASM_CFLAGS := $(shell echo $(STAGE_2_CFLAGS) | sed -e "s/-fcf-protection//g" -e "s/-mbranch-protection=standard//g") -STAGE_2_WASM_CXXFLAGS := $(shell echo $(STAGE_2_CXXFLAGS) | sed -e "s/-fcf-protection//g" -e "s/-mbranch-protection=standard//g") +STAGE_2_WASM_CFLAGS := $(filter-out -march=% -mfpu=% -fcf-protection% -mbranch-protection%, $(STAGE_2_CFLAGS)) +STAGE_2_WASM_CXXFLAGS := $(filter-out -march=% -mfpu=% -fcf-protection% -mbranch-protection%, $(STAGE_2_CXXFLAGS)) build-wasm/compiler-rt-%: cpu = $(@:build-wasm/compiler-rt-%=%) build-wasm/compiler-rt-%: @@ -968,8 +969,8 @@ sccache-stats: override_dh_auto_build: \ debian-full-build \ debian-libfuzzer-build \ - debian-libclc-build \ - debian-wasm-build \ + $(if $(filter libclc-%, $(shell dh_listpackages)),debian-libclc-build) \ + $(if $(filter %-wasm32 %-wasm64, $(shell dh_listpackages)),debian-wasm-build) \ sccache-stats override_dh_prep: build_doc @@ -1131,10 +1132,16 @@ endif # Remove an osx file rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libbolt_rt_instr_osx.a - DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C libclc/build install + if test -d libclc/build; then \ + DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C libclc/build install; \ + fi - DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C build-wasm/compiler-rt-wasm32 install - DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C build-wasm/compiler-rt-wasm64 install + if test -d build-wasm/compiler-rt-wasm32; then \ + DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C build-wasm/compiler-rt-wasm32 install; \ + fi + if test -d build-wasm/compiler-rt-wasm64; then \ + DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C build-wasm/compiler-rt-wasm64 install; \ + fi if test -d build-wasm/libcxx-wasm32-wasi; then \ DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C build-wasm/libcxx-wasm32-wasi install; \ fi