Skip to content

Commit 8ed1d6e

Browse files
committed
fixup sccache path
1 parent dec45d1 commit 8ed1d6e

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

wheelbuild/config.sh

+9-12
Original file line numberDiff line numberDiff line change
@@ -152,25 +152,22 @@ function install_sccache {
152152
fi
153153
fetch_unpack "${base_url}/${archive_name}.tar.gz"
154154
if [ -e "$archive_name/sccache" ]; then
155-
cp "$archive_name/sccache" "/usr/local/bin/sccache"
156-
chmod +x /usr/local/bin/sccache
155+
cp "$archive_name/sccache" "$BUILD_PREFIX/bin/sccache"
156+
chmod +x $BUILD_PREFIX/bin/sccache
157+
export USE_SCCACHE=1
158+
export SCCACHE_DIR=$PWD/sccache
157159
fi
158160

159-
export USE_SCCACHE=1
160-
export SCCACHE_DIR=$PWD/sccache
161-
elif [ ! -e /usr/local/bin/sccache ]; then
161+
elif [ ! -e $BUILD_PREFIX/bin/sccache ]; then
162162
local archive_name="sccache-v${SCCACHE_VERSION}-${PLAT}-unknown-linux-musl"
163163
fetch_unpack "${base_url}/${archive_name}.tar.gz"
164164
if [ -e "$archive_name/sccache" ]; then
165-
cp "$archive_name/sccache" "/usr/local/bin/sccache"
166-
chmod +x /usr/local/bin/sccache
165+
cp "$archive_name/sccache" "$BUILD_PREFIX/bin/sccache"
166+
chmod +x $BUILD_PREFIX/bin/sccache
167+
export USE_SCCACHE=1
168+
export SCCACHE_DIR=$PWD/sccache
167169
fi
168170
fi
169-
if [ -e /usr/local/bin/sccache ]; then
170-
export USE_SCCACHE=1
171-
export SCCACHE_DIR=$PWD/sccache
172-
ln -s /usr/local/bin/sccache $BUILD_PREFIX/bin
173-
fi
174171
group_end
175172
}
176173

0 commit comments

Comments
 (0)