larroy commented on a change in pull request #11096: [MXNET-472] ccache for docker builds URL: https://github.com/apache/incubator-mxnet/pull/11096#discussion_r192721946
########## File path: ci/docker/runtime_functions.sh ########## @@ -31,14 +31,49 @@ clean_repo() { git submodule update --init --recursive } +# wrap compiler calls with ccache +build_ccache_wrappers() { + set -ex + + rm -f cc + rm -f cxx + + touch cc + touch cxx + + if [ -z ${CC+x} ]; then + echo "No \$CC set, defaulting to gcc"; + export CC=gcc + fi + + if [ -z ${CXX+x} ]; then + echo "No \$CXX set, defaulting to g++"; + export CXX=g++ + fi + + # this function is nessesary for cuda enabled make based builds, since nvcc needs just an executable for -ccbin + + echo -e "#!/bin/sh\n/usr/local/bin/ccache ${CC} \"\$@\"\n" >> cc Review comment: Agree, I think we should use > doesn't make sense to append in case the file already exist does it? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services