Commit 4936bf7c authored by xoviat's avatar xoviat Committed by GitHub
Browse files

docker: link up ccache

Link the docker ccache directory to the VM; install and verify that ccache is operating correctly
parent ad377b63
...@@ -7,6 +7,28 @@ ...@@ -7,6 +7,28 @@
# BUILD_DEPENDS (may be used by config.sh, can be empty) # BUILD_DEPENDS (may be used by config.sh, can be empty)
set -e set -e
if [ $USE_CCACHE == 1 ]; then
# Link up the correct location for ccache
ln -s /ccache $HOME/.ccache
# Now install ccache
yum install -y ccache
# Create fake compilers and prepend them to the PATH
# Note that yum is supposed to create these for us,
# but I had trouble finding them
CCACHE_DIR=/usr/lib/ccache/compilers
mkdir -p $CCACHE_DIR
ln -s /usr/bin/ccache $CCACHE_DIR/gcc
ln -s /usr/bin/ccache $CCACHE_DIR/g++
ln -s /usr/bin/ccache $CCACHE_DIR/cc
ln -s /usr/bin/ccache $CCACHE_DIR/c++
export PATH=$CCACHE_DIR:$PATH
# Prove to the developer that the correct gcc is used
which gcc
fi
# Unicode width, default 32 # Unicode width, default 32
UNICODE_WIDTH=${UNICODE_WIDTH:-32} UNICODE_WIDTH=${UNICODE_WIDTH:-32}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment