builder: Fix the bug with compiler selection
ci/woodpecker/push/lint Pipeline failed Details
ci/woodpecker/push/build Pipeline failed Details

This commit is contained in:
Sameer Rahmani 2023-02-06 13:37:24 +00:00
parent 852071c229
commit 72c3b0ce16
Signed by: lxsameer
GPG Key ID: B0A4AF28AB9FD90B
1 changed files with 10 additions and 2 deletions

12
builder
View File

@ -58,8 +58,16 @@ source "$ME/scripts/devfs.sh"
# By default Clang is the compiler that we use and support. But you may use
# whatever you want. But just be aware of the fact that we might not be able
# to help you in case of any issue.
CC="${CC:-clang}"
CXX="${CXX:-clang++}"
if [[ "$CC" = "" ]]; then
CC=$(which clang)
export CC
fi
if [[ "$CXX" = "" ]]; then
CXX=$(which clang++)
export CXX
fi
# Using LLD is a must
LDFLAGS="-fuse-ld=lld"
# The target architectures that we want to build Serene in and also we want