diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index 177962fc..03fba7a4 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -135,7 +135,8 @@ enable_ccache () { fi export CCACHE_PATH=${COMPILER_PATH}/ - CCACHE_ENABLE="-prefs compiler.path=${CCACHE_WRAPPER_PATH}/" + CCACHE_ENABLED=1 + fi } @@ -469,12 +470,20 @@ do_compile_with_cli() { #-build-cache "${CORE_CACHE_PATH}" \ #$CCACHE_ENABLE \ #${ARDUINO_AVR_GCC_PREFIX_PARAM} \ + + + if [ $CCACHE_ENABLED ]; then + COMPILER_PATH_PROP="--build-properties \"compiler.path=${CCACHE_WRAPPER_PATH}/\"" + else + COMPILER_PATH_PROP="--build-properties \"compiler.path=${COMPILER_PATH}\"" + fi + run_arduino_cli compile \ --fqbn "${FQBN}" \ --libraries "${KALEIDOSCOPE_DIR}/.." \ --build-path "${BUILD_PATH}" \ --output-dir "${OUTPUT_PATH}" \ - --build-properties compiler.path="${COMPILER_PATH}" \ + ${COMPILER_PATH_PROP} \ --build-properties "compiler.c.cmd=${_CMD_CC}" \ --build-properties "compiler.cpp.cmd=${_CMD_CXX}" \ --build-properties "compiler.ar.cmd=${_CMD_AR}" \