mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-07-27 11:41:39 +00:00
* Use a stamps subdirectory for all build stamps.
This commit is contained in:
parent
4de149a809
commit
e27b3f677e
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -13,6 +13,7 @@ llvm-toolchain-snapshot (1:18~++20230921012857+4cf8da94198d-1~exp1) UNRELEASED;
|
|||||||
* Limit the parallel links to 2 on riscv64.
|
* Limit the parallel links to 2 on riscv64.
|
||||||
* d/rules: Be less noisy when building without grpc.
|
* d/rules: Be less noisy when building without grpc.
|
||||||
* Build-depend on libncurses-dev instead of libncurses5-dev.
|
* Build-depend on libncurses-dev instead of libncurses5-dev.
|
||||||
|
* Use a stamps subdirectory for all build stamps.
|
||||||
|
|
||||||
-- Matthias Klose <doko@debian.org> Sun, 08 Oct 2023 08:10:51 +0200
|
-- Matthias Klose <doko@debian.org> Sun, 08 Oct 2023 08:10:51 +0200
|
||||||
|
|
||||||
|
45
debian/rules
vendored
45
debian/rules
vendored
@ -532,7 +532,7 @@ ENABLED_STAGE2_CMAKE_BUILD_TARGETS = check-all;check-llvm;check-clang;check-clan
|
|||||||
PROJECTS_LIST := $(shell echo "$(PROJECTS)"|sed -e "s| ||g")
|
PROJECTS_LIST := $(shell echo "$(PROJECTS)"|sed -e "s| ||g")
|
||||||
RUNTIMES_LIST := $(shell echo "$(RUNTIMES)"|sed -e "s| ||g")
|
RUNTIMES_LIST := $(shell echo "$(RUNTIMES)"|sed -e "s| ||g")
|
||||||
|
|
||||||
preconfigure:
|
stamps/preconfigure:
|
||||||
if ! grep -qs '/proc ' /proc/mounts; then \
|
if ! grep -qs '/proc ' /proc/mounts; then \
|
||||||
echo "/proc needs to be mounted"; \
|
echo "/proc needs to be mounted"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
@ -616,13 +616,16 @@ endif
|
|||||||
dh_listpackages; \
|
dh_listpackages; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
@mkdir -p stamps
|
||||||
|
touch $@
|
||||||
|
|
||||||
# Override this two targets. They are trying to manage the .in conversion for me
|
# Override this two targets. They are trying to manage the .in conversion for me
|
||||||
override_dh_ocamlinit:
|
override_dh_ocamlinit:
|
||||||
override_dh_ocamlclean:
|
override_dh_ocamlclean:
|
||||||
override_dh_ocaml:
|
override_dh_ocaml:
|
||||||
|
|
||||||
override_dh_auto_configure: preconfigure
|
override_dh_auto_configure: stamps/configure
|
||||||
|
stamps/configure: stamps/preconfigure
|
||||||
ifeq (${SCCACHE_ENABLE},yes)
|
ifeq (${SCCACHE_ENABLE},yes)
|
||||||
ls -al $(SCCACHE_PATH)*
|
ls -al $(SCCACHE_PATH)*
|
||||||
endif
|
endif
|
||||||
@ -762,10 +765,12 @@ endif
|
|||||||
echo "mismatch of version. Found: $$FOUND_VERSION / Expected: $(LLVM_VERSION_FULL)"; \
|
echo "mismatch of version. Found: $$FOUND_VERSION / Expected: $(LLVM_VERSION_FULL)"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
@mkdir -p stamps
|
||||||
|
touch $@
|
||||||
|
|
||||||
VERBOSE=-v
|
VERBOSE=-v
|
||||||
|
|
||||||
debian-full-build:
|
stamps/debian-full-build:
|
||||||
echo "Using cmake: $(CMAKE_BIN)"
|
echo "Using cmake: $(CMAKE_BIN)"
|
||||||
# linker hack so stage2 can link against stage1 libs at runtime
|
# linker hack so stage2 can link against stage1 libs at runtime
|
||||||
LD_LIBRARY_PATH=$(STAGE_1_LIB_DIR):$$LD_LIBRARY_PATH \
|
LD_LIBRARY_PATH=$(STAGE_1_LIB_DIR):$$LD_LIBRARY_PATH \
|
||||||
@ -788,7 +793,7 @@ debian-full-build:
|
|||||||
fi
|
fi
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
debian-libfuzzer-build:
|
stamps/debian-libfuzzer-build:
|
||||||
ifeq (${LIBFUZZER_ENABLE},yes)
|
ifeq (${LIBFUZZER_ENABLE},yes)
|
||||||
cd $(TARGET_BUILD); \
|
cd $(TARGET_BUILD); \
|
||||||
CFLAGS="$(opt_flags) $(STAGE_2_CFLAGS)"; \
|
CFLAGS="$(opt_flags) $(STAGE_2_CFLAGS)"; \
|
||||||
@ -800,7 +805,7 @@ ifeq (${LIBFUZZER_ENABLE},yes)
|
|||||||
endif
|
endif
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
debian-libclc-build:
|
stamps/debian-libclc-build:
|
||||||
# workaround missing files on i386
|
# workaround missing files on i386
|
||||||
cd $(TARGET_BUILD_STAGE2) && ninja opt llvm-link llvm-as
|
cd $(TARGET_BUILD_STAGE2) && ninja opt llvm-link llvm-as
|
||||||
# Builds libclc
|
# Builds libclc
|
||||||
@ -950,13 +955,13 @@ endif
|
|||||||
|
|
||||||
# Build compiler-rt for wasm32 and wasm64. Build libcxx only for wasm32, as
|
# Build compiler-rt for wasm32 and wasm64. Build libcxx only for wasm32, as
|
||||||
# libcxx requires wasi-libc, which only exists for wasm32 right now.
|
# libcxx requires wasi-libc, which only exists for wasm32 right now.
|
||||||
debian-wasm-build: \
|
stamps/debian-wasm-build: \
|
||||||
build-wasm/compiler-rt-wasm32 \
|
build-wasm/compiler-rt-wasm32 \
|
||||||
build-wasm/libcxx-wasm32-wasi \
|
build-wasm/libcxx-wasm32-wasi \
|
||||||
build-wasm/compiler-rt-wasm64
|
build-wasm/compiler-rt-wasm64
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
sccache-stats:
|
stamps/sccache-stats:
|
||||||
# If we used sccache, shows stats
|
# If we used sccache, shows stats
|
||||||
if test -f $(SCCACHE_CMD); then \
|
if test -f $(SCCACHE_CMD); then \
|
||||||
ls -al $(SCCACHE_PATH)/; \
|
ls -al $(SCCACHE_PATH)/; \
|
||||||
@ -967,21 +972,21 @@ sccache-stats:
|
|||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
override_dh_auto_build: \
|
override_dh_auto_build: \
|
||||||
debian-full-build \
|
stamps/debian-full-build \
|
||||||
debian-libfuzzer-build \
|
stamps/debian-libfuzzer-build \
|
||||||
$(if $(filter libclc-%, $(shell dh_listpackages)),debian-libclc-build) \
|
$(if $(filter libclc-%, $(shell dh_listpackages)),stamps/debian-libclc-build) \
|
||||||
$(if $(filter %-wasm32 %-wasm64, $(shell dh_listpackages)),debian-wasm-build) \
|
$(if $(filter %-wasm32 %-wasm64, $(shell dh_listpackages)),stamps/debian-wasm-build) \
|
||||||
sccache-stats
|
stamps/sccache-stats
|
||||||
|
|
||||||
override_dh_prep: build_doc
|
override_dh_prep: stamps/build_doc
|
||||||
dh_prep
|
dh_prep
|
||||||
|
|
||||||
ifeq ($(DOC_GENERATION), no)
|
ifeq ($(DOC_GENERATION), no)
|
||||||
build_doc:
|
stamps/build_doc:
|
||||||
mkdir -p $(TARGET_BUILD)/tools/clang/stage2-bins/docs/ocamldoc/html/
|
mkdir -p $(TARGET_BUILD)/tools/clang/stage2-bins/docs/ocamldoc/html/
|
||||||
@echo "Don't build doc on this distro $(DISTRO)"
|
@echo "Don't build doc on this distro $(DISTRO)"
|
||||||
else
|
else
|
||||||
build_doc:
|
stamps/build_doc:
|
||||||
BUILDDIR="_build"; \
|
BUILDDIR="_build"; \
|
||||||
ALLSPHINXOPTS="-d $$BUILDDIR/doctrees ."; \
|
ALLSPHINXOPTS="-d $$BUILDDIR/doctrees ."; \
|
||||||
cd $(CURDIR)/llvm/docs && \
|
cd $(CURDIR)/llvm/docs && \
|
||||||
@ -1260,6 +1265,7 @@ endif
|
|||||||
# Delete the target build directory to save some space on the build systems
|
# Delete the target build directory to save some space on the build systems
|
||||||
# All the files have been installed in $(CURDIR)/debian/tmp/ already
|
# All the files have been installed in $(CURDIR)/debian/tmp/ already
|
||||||
rm -rf $(TARGET_BUILD)
|
rm -rf $(TARGET_BUILD)
|
||||||
|
# FIXME: why a stamp for dh_override_install ?
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
|
||||||
@ -1347,7 +1353,7 @@ endif
|
|||||||
# So, we remove this directory from the package
|
# So, we remove this directory from the package
|
||||||
rm -fr $(CURDIR)/debian/libclang-rt-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION)/lib/wasi/
|
rm -fr $(CURDIR)/debian/libclang-rt-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION)/lib/wasi/
|
||||||
|
|
||||||
repack_a_llvm_ir:
|
stamps/repack_a_llvm_ir:
|
||||||
ifeq (${LTO_ENABLE},yes)
|
ifeq (${LTO_ENABLE},yes)
|
||||||
# with LTO, .a contains llvm ir instead of native code. So, recompile them
|
# with LTO, .a contains llvm ir instead of native code. So, recompile them
|
||||||
NJOBS="$(NJOBS)" P_TO_LLVM="$(CURDIR)" VERSION=$(LLVM_VERSION) bash -v debian/llvm-compile-lto-elf.sh $(CXXFLAGS_EXTRA)
|
NJOBS="$(NJOBS)" P_TO_LLVM="$(CURDIR)" VERSION=$(LLVM_VERSION) bash -v debian/llvm-compile-lto-elf.sh $(CXXFLAGS_EXTRA)
|
||||||
@ -1355,7 +1361,7 @@ endif
|
|||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
|
||||||
override_dh_installdeb: repack_a_llvm_ir
|
override_dh_installdeb: stamps/repack_a_llvm_ir
|
||||||
# Managed by the package
|
# Managed by the package
|
||||||
dh_installdeb -a
|
dh_installdeb -a
|
||||||
|
|
||||||
@ -1458,7 +1464,7 @@ override_dh_auto_test:
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
override_dh_gencontrol: sccache-stats
|
override_dh_gencontrol: stamps/sccache-stats
|
||||||
dh_gencontrol -- $(control_vars)
|
dh_gencontrol -- $(control_vars)
|
||||||
|
|
||||||
|
|
||||||
@ -1490,6 +1496,7 @@ override_dh_auto_clean:
|
|||||||
: # for some reason, the docs are written to debian/usr and debian/man ...
|
: # for some reason, the docs are written to debian/usr and debian/man ...
|
||||||
rm -rf debian/usr debian/man
|
rm -rf debian/usr debian/man
|
||||||
: # remove extra stamps
|
: # remove extra stamps
|
||||||
rm -f debian-*-build override_dh_auto_install sccache-stats build_doc
|
rm -f override_dh_auto_install
|
||||||
|
rm -rf stamps
|
||||||
|
|
||||||
.PHONY: override_dh_strip preconfigure
|
.PHONY: override_dh_strip preconfigure
|
||||||
|
Loading…
Reference in New Issue
Block a user