Skip to content

Commit

Permalink
sccache: Add arm linux support
Browse files Browse the repository at this point in the history
Pick-to: 6.8
Change-Id: I630cdc7bbff320c6ca8e17b33f0e9fc05f6a63af
Reviewed-by: Simo Fält <[email protected]>
Reviewed-by: Liang Qi <[email protected]>
  • Loading branch information
liangqi committed Sep 11, 2024
1 parent 90308d8 commit cad1945
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
11 changes: 9 additions & 2 deletions coin/provisioning/common/linux/sccache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ set -ex

source "${BASH_SOURCE%/*}/../unix/sccache.sh"

targetArch=x86_64-unknown-linux-musl
targetVersion=0.2.14
sha1=281680c0fc2c09173e94d12ba45d9f1b8e62e5b3

if [[ $(uname -m) == 'aarch64' ]]; then
targetArch=aarch64-unknown-linux-musl
sha1=0f9b57c423d77f7aa89bb642864ac7689d84d6a0
else
targetArch=x86_64-unknown-linux-musl
sha1=281680c0fc2c09173e94d12ba45d9f1b8e62e5b3
fi

installSccache "$targetArch" "$targetVersion" "$sha1"
4 changes: 4 additions & 0 deletions coin/provisioning/common/unix/sccache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function installSccache {

sudo mkdir -p /usr/local/sccache
sudo tar -C /usr/local/sccache -x -z --totals --strip-components=1 --file="$targetFile"
sudo chmod +x /usr/local/sccache/sccache

# add sccache __before__ the real compiler
SetEnvVar "PATH" "/usr/local/sccache:\$PATH"
Expand All @@ -32,4 +33,7 @@ function installSccache {
chmod 755 "$HOME/sccache_wrapper/sccache"
SetEnvVar "PATH" "$HOME/sccache_wrapper:\$PATH"

# Prevents some random network I/O errors from failing compilation
# Does not seem to affect much though
SetEnvVar "SCCACHE_IGNORE_SERVER_IO_ERROR" "1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

source "${BASH_SOURCE%/*}/../common/linux/sccache.sh"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

source "${BASH_SOURCE%/*}/../common/linux/sccache.sh"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

source "${BASH_SOURCE%/*}/../common/linux/sccache.sh"

0 comments on commit cad1945

Please sign in to comment.