Add custom LLVM compiler path support (#102)

This commit is contained in:
Tony 2020-10-27 16:55:39 -04:00 committed by GitHub
parent dfbb291d5d
commit 8476633083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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)

View File

@ -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