try to enable sccache on 'my' s390x machines

This commit is contained in:
Sylvestre Ledru 2024-01-24 11:51:17 +01:00
parent 2a2d05e967
commit 9827291d40

9
debian/rules vendored
View File

@ -509,7 +509,7 @@ SCCACHE_ENABLE=no
SCCACHE_CMAKE = SCCACHE_CMAKE =
# if sccache is installed in the chroot, use it # if sccache is installed in the chroot, use it
ifeq ($(shell test -e /opt/sccache/sccache && echo -n yes),yes) ifeq ($(shell test -e /opt/sccache/sccache && echo -n yes),yes)
ifneq (,$(filter $(DEB_HOST_ARCH),i386 amd64)) ifneq (,$(filter $(DEB_HOST_ARCH),i386 amd64 s390x))
STAGE_1_CMAKE_EXTRA += $(SCCACHE_CMAKE) STAGE_1_CMAKE_EXTRA += $(SCCACHE_CMAKE)
SCCACHE_ENABLE=yes SCCACHE_ENABLE=yes
SCCACHE_PATH=/opt/sccache/ SCCACHE_PATH=/opt/sccache/
@ -710,8 +710,13 @@ endif
ifeq (${SCCACHE_ENABLE},yes) ifeq (${SCCACHE_ENABLE},yes)
# Just in case... # Just in case...
$(SCCACHE_CMD) --stop-server||true $(SCCACHE_CMD) --stop-server||true
ifneq (,$(filter $(DEB_HOST_ARCH),i386 amd64))
# Start the sccache server with the right set of options to use GCP # Start the sccache server with the right set of options to use GCP
SCCACHE_LOG=sccache=debug SCCACHE_ERROR_LOG=$(SCCACHE_PATH)/sccache.log SCCACHE_GCS_KEY_PATH=$(SCCACHE_PATH)/secret-gcp-storage.json SCCACHE_GCS_BUCKET=apt-llvm-org-sccache SCCACHE_GCS_RW_MODE=READ_WRITE $(SCCACHE_CMD) --start-server SCCACHE_LOG=sccache=debug SCCACHE_ERROR_LOG=$(SCCACHE_PATH)/sccache.log SCCACHE_GCS_KEY_PATH=$(SCCACHE_PATH)/secret-gcp-storage.json SCCACHE_GCS_BUCKET=apt-llvm-org-sccache SCCACHE_GCS_RW_MODE=READ_WRITE $(SCCACHE_CMD) --start-server
else
# on s390x machine, use a local cache
SCCACHE_LOG=sccache=debug SCCACHE_ERROR_LOG=$(SCCACHE_PATH)/sccache.log SCCACHE_DIR=/opt/sccache/cache/ SCCACHE_DIRECT=true $(SCCACHE_CMD) --start-server
endif
endif endif
echo "Running tests: $(RUN_TEST)" echo "Running tests: $(RUN_TEST)"
echo "Using cmake: $(CMAKE_BIN)"; \ echo "Using cmake: $(CMAKE_BIN)"; \