Add custom LLVM compiler path support (#102)
This commit is contained in:
parent
dfbb291d5d
commit
8476633083
4
PKGBUILD
4
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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user