Skip to content

Commit dd3262f

Browse files
authored
[ci][docker] Conditionally link sccache to clang (#11316)
This was causing errors with #11314 since it was making it appear as if `clang` was available when it was only the sccache wrapper. Co-authored-by: driazati <[email protected]>
1 parent f34bd22 commit dd3262f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docker/install/ubuntu_install_sccache.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@ cargo install sccache
2626
mkdir /opt/sccache
2727
ln "$(which sccache)" /opt/sccache/cc
2828
ln "$(which sccache)" /opt/sccache/c++
29-
ln "$(which sccache)" /opt/sccache/clang
30-
ln "$(which sccache)" /opt/sccache/clang++
29+
30+
# Only add clang if it's on the PATH
31+
if command -v clang &> /dev/null
32+
then
33+
ln "$(which sccache)" /opt/sccache/clang
34+
ln "$(which sccache)" /opt/sccache/clang++
35+
fi
36+
3137

3238
# make rust usable by all users after install during container build
3339
chmod -R a+rw /opt/rust

0 commit comments

Comments
 (0)