move virtual arch compiler customization into where we set executable paths

tmp/arduino-cli-pre-rebase
Jesse Vincent 4 years ago
parent 856d7a91a8
commit 6d1b9419e2
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -118,6 +118,16 @@ _set_executable_paths() {
###### Executable paths
######
if [ "${ARCH}" = "virtual" ]; then
if [ "${uname_S}" = "FreeBSD" ]; then
: "${COMPILER_PATH:=/usr/local/bin/}"
else
: "${COMPILER_PATH:=/usr/bin/}"
fi
COMPILER_PREFIX=""
fi
# Allow the compiler path to be empty for virtual builds
# should use compiler.path instead of appending bin, but we don't have substitution het
: "${COMPILER_PATH=$(_arduino_prop 'runtime.tools.avr-gcc.path')/bin}"
@ -442,7 +452,6 @@ else
ARDUINO_VERBOSE="--quiet"
fi
if [[ -z "${ARCH}" && -n "${FQBN}" ]]; then
ARCH=$(echo "${FQBN}" | sed -n -e 's/^[^:]\+:\([^:]\+\).*/\1/p')
fi
@ -451,15 +460,6 @@ fi
: "${ARCH:=avr}"
: "${FQBN:=keyboardio:${ARCH}:${BOARD}}"
if [ "${ARCH}" = "virtual" ]; then
if [ "${uname_S}" = "FreeBSD" ]; then
: "${COMPILER_PATH:=/usr/local/bin/}"
else
: "${COMPILER_PATH:=/usr/bin/}"
fi
COMPILER_PREFIX=""
fi
if [ $# -eq 2 ]; then

Loading…
Cancel
Save