mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-24 10:18:50 +00:00
sccache: use variables for the binary & path
This commit is contained in:
parent
b9d2b57c3b
commit
06f31916f1
18
debian/rules
vendored
18
debian/rules
vendored
@ -445,9 +445,11 @@ SCCACHE_ENABLE=no
|
||||
SCCACHE_CMAKE =
|
||||
# if sccache is installed in the chroot, use it
|
||||
ifeq ($(shell test -e /opt/sccache/sccache && echo -n yes),yes)
|
||||
SCCACHE_CMAKE = -DCMAKE_C_COMPILER_LAUNCHER=/opt/sccache/sccache -DCMAKE_CXX_COMPILER_LAUNCHER=/opt/sccache/sccache
|
||||
STAGE_1_CMAKE_EXTRA += $(SCCACHE_CMAKE)
|
||||
SCCACHE_ENABLE=yes
|
||||
SCCACHE_PATH=/opt/sccache/
|
||||
SCCACHE_CMD=$(SCCACHE_PATH)/sccache
|
||||
SCCACHE_CMAKE = -DCMAKE_C_COMPILER_LAUNCHER=$(SCCACHE_CMD) -DCMAKE_CXX_COMPILER_LAUNCHER=$(SCCACHE_CMD)
|
||||
export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:/opt/sccache
|
||||
endif
|
||||
|
||||
@ -542,8 +544,8 @@ override_dh_ocamlclean:
|
||||
override_dh_ocaml:
|
||||
|
||||
override_dh_auto_configure: preconfigure
|
||||
if test -f /opt/sccache/sccache; then \
|
||||
ls -al /opt/sccache/*; \
|
||||
if test -f $(SCCACHE_CMD); then \
|
||||
ls -al $(SCCACHE_PATH)*; \
|
||||
fi
|
||||
echo "Using gcc: "
|
||||
$(CC) -v
|
||||
@ -583,9 +585,9 @@ override_dh_auto_configure: preconfigure
|
||||
#- https://bit.ly/3kDNpC9
|
||||
ifeq (${SCCACHE_ENABLE},yes)
|
||||
# Just in case...
|
||||
/opt/sccache/sccache --stop-server||true
|
||||
$(SCCACHE_CMD) --stop-server||true
|
||||
# Start the sccache server with the right set of options to use GCP
|
||||
SCCACHE_LOG=sccache=debug SCCACHE_ERROR_LOG=/opt/sccache/sccache.log SCCACHE_GCS_KEY_PATH=/opt/sccache/secret-gcp-storage.json SCCACHE_GCS_BUCKET=apt-llvm-org-sccache SCCACHE_GCS_RW_MODE=READ_WRITE /opt/sccache/sccache --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
|
||||
endif
|
||||
echo "Running tests: $(RUN_TEST)"
|
||||
echo "Using cmake: $(CMAKE_BIN)"; \
|
||||
@ -858,10 +860,10 @@ debian-wasm-build: \
|
||||
|
||||
sccache-stats:
|
||||
# If we used sccache, shows stats
|
||||
if test -f /opt/sccache/sccache; then \
|
||||
ls -al /opt/sccache/; \
|
||||
if test -f $(SCCACHE_CMD); then \
|
||||
ls -al $(SCCACHE_PATH)/; \
|
||||
mkdir -p /tmp/buildd/source/; \
|
||||
/opt/sccache/sccache --stats-format json --show-stats > /tmp/buildd/source/sccache-stats.json; \
|
||||
$(SCCACHE_CMD) --stats-format json --show-stats > /tmp/buildd/source/sccache-stats.json; \
|
||||
cat /tmp/buildd/source/sccache-stats.json; \
|
||||
fi
|
||||
touch $@
|
||||
|
Loading…
Reference in New Issue
Block a user