diff --git a/debian/changelog b/debian/changelog index 25021b0f..ae0f0704 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ llvm-toolchain-15 (1:15.0.3-3) UNRELEASED; urgency=medium * debian: Bump llvm-spirv to 15 to match the llvm version * d/rules: Set LLVM_SPIRV with cmake for libclc * d/patches: Drop libclc-llvm-spirv.diff now that we are setting LLVM_SPIRV + * d/rules: Restore building libclc .bc output without spir-v support -- Jordan Justen Sun, 30 Oct 2022 00:26:40 -0700 diff --git a/debian/libclc-X.Y.install.in b/debian/libclc-X.Y.install.in index 679ba86f..923094ff 100644 --- a/debian/libclc-X.Y.install.in +++ b/debian/libclc-X.Y.install.in @@ -1,2 +1,2 @@ usr/lib/clc/*.bc -usr/lib/clc/*.spv +#spv usr/lib/clc/*.spv diff --git a/debian/rules b/debian/rules index e4a0d176..f1179237 100755 --- a/debian/rules +++ b/debian/rules @@ -522,12 +522,12 @@ preconfigure: fi; \ fi - # Conditionally enable *.spv files. Debian buster and Ubuntu 18.04 - # don't have llvm-spirv to create the *.spv files. - if test "$(LLVM_SPIRV_INSTALLED)" = "no"; then \ - echo "" > debian/libclc-$(LLVM_VERSION).install; \ - echo "" > debian/libclc-$(LLVM_VERSION)-dev.install; \ - fi +ifdef LLVM_SPIRV + # llvm-spirv was found, so we can enable *.spv files. Debian + # buster and Ubuntu 18.04 don't have llvm-spirv to create the + # *.spv files. + sed -i -e "s|#spv\ ||g" debian/libclc-$(LLVM_VERSION).install +endif if test "$(DISTRO)" = "stretch"; then \ echo "" > debian/python3-lldb-$(LLVM_VERSION).install; \ fi @@ -718,7 +718,6 @@ endif touch $@ debian-libclc-build: -ifeq ($(LLVM_SPIRV_INSTALLED),yes) # Builds libclc mkdir -p libclc/build echo "Using cmake: $(CMAKE_BIN)" @@ -740,8 +739,8 @@ ifeq ($(LLVM_SPIRV_INSTALLED),yes) $(LIBCLC_LLVM_SPIRV) \ -DLIBCLC_TARGETS_TO_BUILD=$(LIBCLC_TARGETS_TO_BUILD); \ ninja -j $(NJOBS) $(VERBOSE) -else - echo "libclc isn't built LLVM_SPIRV_INSTALLED=$(LLVM_SPIRV_INSTALLED)" +ifndef LLVM_SPIRV + echo "libclc built without SPIRV (.spv) outputs because llvm-spirv wasn't found" endif touch $@ @@ -935,9 +934,7 @@ endif # Remove an osx file rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libbolt_rt_instr_osx.a -ifeq ($(LLVM_SPIRV_INSTALLED),yes) DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C libclc/build install -endif ifeq (${COMPILER_RT_WASM_ENABLE},yes) DESTDIR=$(DEB_INST) ninja $(VERBOSE) -C build-compiler-rt-wasm32 install @@ -1173,10 +1170,8 @@ endif # MLIR ninja $(VERBOSE) -C $(TARGET_BUILD_STAGE2) check-mlir || true -ifeq ($(LLVM_SPIRV_INSTALLED),yes) # Libclc ninja $(VERBOSE) -C libclc/build test || true -endif # LLDB tests ifeq (,$(filter $(DEB_HOST_ARCH), $(LLDB_DISABLE_ARCHS) armhf armel))