Skip to content

Commit

Permalink
Fix build_ccache_wrappers:
Browse files Browse the repository at this point in the history
* Fix broken links
* Make it idempotent
fixes apache#13456
fixes apache#14117
  • Loading branch information
larroy committed Apr 5, 2019
1 parent d5d1d7a commit 8ae0353
Showing 1 changed file with 15 additions and 26 deletions.
41 changes: 15 additions & 26 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,37 +66,26 @@ build_ccache_wrappers() {
# But in the beginning, we'll make this opt-in. In future, loads of processes like
# the scala make step or numpy compilation and other pip package generations
# could be heavily sped up by using ccache as well.
mkdir /tmp/ccache-redirects
mkdir -p /tmp/ccache-redirects
export PATH=/tmp/ccache-redirects:$PATH
ln -s ccache /tmp/ccache-redirects/gcc
ln -s ccache /tmp/ccache-redirects/gcc-8
ln -s ccache /tmp/ccache-redirects/g++
ln -s ccache /tmp/ccache-redirects/g++-8
ln -s ccache /tmp/ccache-redirects/nvcc
ln -s ccache /tmp/ccache-redirects/clang++-3.9
ln -s ccache /tmp/ccache-redirects/clang-3.9
ln -s ccache /tmp/ccache-redirects/clang++-5.0
ln -s ccache /tmp/ccache-redirects/clang-5.0
ln -s ccache /tmp/ccache-redirects/clang++-6.0
ln -s ccache /tmp/ccache-redirects/clang-6.0
ln -s ccache /usr/local/bin/gcc
ln -s ccache /usr/local/bin/gcc-8
ln -s ccache /usr/local/bin/g++
ln -s ccache /usr/local/bin/g++-8
ln -s ccache /usr/local/bin/nvcc
ln -s ccache /usr/local/bin/clang++-3.9
ln -s ccache /usr/local/bin/clang-3.9
ln -s ccache /usr/local/bin/clang++-5.0
ln -s ccache /usr/local/bin/clang-5.0
ln -s ccache /usr/local/bin/clang++-6.0
ln -s ccache /usr/local/bin/clang-6.0

CCACHE=`which ccache`
ln -sf $CCACHE /tmp/ccache-redirects/gcc
ln -sf $CCACHE /tmp/ccache-redirects/gcc-8
ln -sf $CCACHE /tmp/ccache-redirects/g++
ln -sf $CCACHE /tmp/ccache-redirects/g++-8
ln -sf $CCACHE /tmp/ccache-redirects/nvcc
ln -sf $CCACHE /tmp/ccache-redirects/clang++-3.9
ln -sf $CCACHE /tmp/ccache-redirects/clang-3.9
ln -sf $CCACHE /tmp/ccache-redirects/clang++-5.0
ln -sf $CCACHE /tmp/ccache-redirects/clang-5.0
ln -sf $CCACHE /tmp/ccache-redirects/clang++-6.0
ln -sf $CCACHE /tmp/ccache-redirects/clang-6.0
export NVCC=ccache

# Uncomment if you would like to debug CCache hit rates.
# You can monitor using tail -f ccache-log
# export CCACHE_LOGFILE=/work/mxnet/ccache-log
# export CCACHE_DEBUG=1
#export CCACHE_LOGFILE=/tmp/ccache-log
#export CCACHE_DEBUG=1
}

build_wheel() {
Expand Down

0 comments on commit 8ae0353

Please sign in to comment.