diff --git a/etc/kaleidoscope-builder.conf b/etc/kaleidoscope-builder.conf index 01a2e77e..d3c310aa 100644 --- a/etc/kaleidoscope-builder.conf +++ b/etc/kaleidoscope-builder.conf @@ -35,6 +35,23 @@ if [ -z "${FQBN}" ]; then FQBN="${FQBN:-keyboardio:avr:${BOARD}}" fi +if [ ! -z "${KALEIDOSCOPE_COMPILER}" ]; then + case "${KALEIDOSCOPE_COMPILER}" in + gnu|gcc|g++) + C_COMPILER_BASENAME=gcc + CXX_COMPILER_BASENAME=g++ + ;; + clang) + C_COMPILER_BASENAME=clang + CXX_COMPILER_BASENAME=clang++ + ;; + *) + echo "Unsupported compiler: ${KALEIDOSCOPE_COMPILER}" >&2 + exit 1 + ;; + esac +fi + ######## ######## Host OS specific commands ########