diff --git a/PKGBUILD b/PKGBUILD index ed1308e..2a04e29 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -356,7 +356,9 @@ build() { cd "${srcdir}/${_srcpath}" # Use custom compiler paths if defined - if [ -n "${CUSTOM_GCC_PATH}" ]; then + if [ "$_compiler_name" = "-llvm" ] && [ -n "${CUSTOM_LLVM_PATH}" ]; then + PATH=${CUSTOM_LLVM_PATH}/bin:${CUSTOM_LLVM_PATH}/lib:${CUSTOM_LLVM_PATH}/include:${PATH} + elif [ -n "${CUSTOM_GCC_PATH}" ]; then PATH=${CUSTOM_GCC_PATH}/bin:${CUSTOM_GCC_PATH}/lib:${CUSTOM_GCC_PATH}/include:${PATH} fi diff --git a/customization.cfg b/customization.cfg index f07b843..2750658 100644 --- a/customization.cfg +++ b/customization.cfg @@ -21,6 +21,10 @@ _NUKR="true" # Example: CUSTOM_GCC_PATH="/home/frog/PKGBUILDS/mostlyportable-gcc/gcc-mostlyportable-9.2.0" CUSTOM_GCC_PATH="" +# Custom LLVM compiler root dirs - Leave empty to use system llvm compiler +# Example: CUSTOM_LLVM_PATH="/home/frog/PKGBUILDS/mostlyportable-llvm/llvm-mostlyportable-11.0.0" +CUSTOM_LLVM_PATH="" + # Set to the number corresponding to a predefined profile to use it. Current list of available profiles : # 1 - Custom (meaning nothing will be enforced and you get to configure everything) # 2 - Ryzen desktop (performance) diff --git a/install.sh b/install.sh index 7399e59..d2a3a41 100755 --- a/install.sh +++ b/install.sh @@ -216,7 +216,9 @@ fi if [ "$1" = "install" ]; then # Use custom compiler paths if defined - if [ -n "${CUSTOM_GCC_PATH}" ]; then + if [ "$_compiler_name" = "-llvm" ] && [ -n "${CUSTOM_LLVM_PATH}" ]; then + PATH=${CUSTOM_LLVM_PATH}/bin:${CUSTOM_LLVM_PATH}/lib:${CUSTOM_LLVM_PATH}/include:${PATH} + elif [ -n "${CUSTOM_GCC_PATH}" ]; then PATH=${CUSTOM_GCC_PATH}/bin:${CUSTOM_GCC_PATH}/lib:${CUSTOM_GCC_PATH}/include:${PATH} fi