From ae4896c64dcb5a23a65e622b1f63e59b58dd7a9c Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Sat, 16 Mar 2024 20:08:16 +0100 Subject: [PATCH] * Add a stage1 profile to disable curl, grpc and spirv. --- debian/changelog | 1 + debian/control | 10 +++++----- debian/control.in | 10 +++++----- debian/rules | 10 ++++++++-- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/debian/changelog b/debian/changelog index e56bd3ac..67f80e94 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ llvm-toolchain-17 (1:17.0.6-9) unstable; urgency=medium * Make libclang-common-17-dev architecture dependent. * Fix sanitizer build on 32bit time_t64 architectures. * Enable compiler-rt runtime again for 32bit time_t64 architectures. + * Add a stage1 profile to disable curl, grpc and spirv. -- Matthias Klose Fri, 08 Mar 2024 14:52:29 +0100 diff --git a/debian/control b/debian/control index a489081f..6e7dc583 100644 --- a/debian/control +++ b/debian/control @@ -27,11 +27,11 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, llvm-spirv-17 [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] | hello, spirv-tools [linux-any] | hello [!i386], wasi-libc | hello, - libcurl4-openssl-dev | libcurl-dev, - libgrpc++-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], - protobuf-compiler-grpc [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], - libprotobuf-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], - protobuf-compiler [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] + libcurl4-openssl-dev | libcurl-dev , + libgrpc++-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] , + protobuf-compiler-grpc [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] , + libprotobuf-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] , + protobuf-compiler [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] , # "| hello" is for older buster/bionic distros without spirv support Build-Conflicts: oprofile Standards-Version: 4.6.2 diff --git a/debian/control.in b/debian/control.in index 2fdf5e56..396c010f 100644 --- a/debian/control.in +++ b/debian/control.in @@ -27,11 +27,11 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, llvm-spirv-17 [amd64 arm64 armhf i386 ppc64 ppc64el riscv64 s390x] | hello, spirv-tools [linux-any] | hello [!i386], wasi-libc | hello, - libcurl4-openssl-dev | libcurl-dev, - libgrpc++-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], - protobuf-compiler-grpc [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], - libprotobuf-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x], - protobuf-compiler [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] + libcurl4-openssl-dev | libcurl-dev , + libgrpc++-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] , + protobuf-compiler-grpc [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] , + libprotobuf-dev [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] , + protobuf-compiler [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] , # "| hello" is for older buster/bionic distros without spirv support Build-Conflicts: oprofile Standards-Version: 4.6.2 diff --git a/debian/rules b/debian/rules index 202e860d..d45c173b 100755 --- a/debian/rules +++ b/debian/rules @@ -158,6 +158,7 @@ STAGE_2_CMAKE_EXTRA += -DCLANG_SYSTEMZ_DEFAULT_ARCH=$(ZARCH) # clangd remote index support requires GRPC & protobuf. # Enable if minimum tested versions are available. CLANGD_GRPC_INSTALLED=no +ifeq (,$(filter stage1, $(DEB_BUILD_PROFILES))) ifeq ($(shell v=$$(dpkg-query -W -f '$${Version}' libgrpc++-dev 2>/dev/null); if [ -z "$$v" ]; then echo 1; else dpkg --compare-versions $$v gt 1.30.0; echo $$?; fi),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) @@ -168,6 +169,7 @@ endif endif endif endif +endif export CC=gcc-$(GCC_VERSION) export CXX=g++-$(GCC_VERSION) @@ -266,6 +268,9 @@ else control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev' endif +ifneq (,$(filter stage1, $(DEB_BUILD_PROFILES))) + LLVM_SPIRV_INSTALLED = no +else LLVM_SPIRV_VERSION := $(LLVM_VERSION) LLVM_SPIRV := $(shell bash -c "command -v llvm-spirv-$(LLVM_SPIRV_VERSION)" 2>/dev/null) ifndef LLVM_SPIRV @@ -287,6 +292,7 @@ else LLVM_SPIRV_INSTALLED = yes endif endif +endif LIBCLC_TARGETS_TO_BUILD=amdgcn--;amdgcn--amdhsa;amdgcn-mesa-mesa3d;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl LIBCLC_LLVM_SPIRV = @@ -746,7 +752,7 @@ endif -DLLVM_INCLUDE_GO_TESTS=OFF \ -DLLVM_USE_RELATIVE_PATHS_IN_FILES=ON \ -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ - -DLLVM_ENABLE_CURL=ON \ + -DLLVM_ENABLE_CURL=$(if $(filter stage1, $(DEB_BUILD_PROFILES)),OFF,ON) \ -DLLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO=ON \ -DCLANG_PLUGIN_SUPPORT=OFF \ -DCLANG_BUILD_EXAMPLES=OFF \ @@ -799,7 +805,7 @@ endif -DBOOTSTRAP_LLVM_POLLY_LINK_INTO_TOOLS=ON \ -DBOOTSTRAP_LLVM_EXPERIMENTAL_TARGETS_TO_BUILD="M68k;Xtensa" \ -DBOOTSTRAP_LLVM_LINK_LLVM_DYLIB=ON \ - -DBOOTSTRAP_LLVM_ENABLE_CURL=ON \ + -DBOOTSTRAP_LLVM_ENABLE_CURL=$(if $(filter stage1, $(DEB_BUILD_PROFILES)),OFF,ON) \ -DBOOTSTRAP_CLANG_LINK_CLANG_DYLIB=ON \ -DBOOTSTRAP_LIBCLANG_LIBRARY_VERSION=$(SONAME_EXT) \ -DBOOTSTRAP_LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=ON \