Skip to content

Commit c360dd7

Browse files
committed
Add variable to build-lx.sh, for easier switching between compilers
1 parent 466b543 commit c360dd7

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

CPP/build-lx.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ function build() {
99

1010
case "$ARCH" in
1111
x86_64)
12-
make CC=clang CXX=clang++ -j$((nproc-1)) -f makefile.gcc IS_X64=1 USE_ASM=1 MY_ASM=uasm || exit 1
12+
make CC=$CC CXX=$CXX -j$((nproc-1)) -f makefile.gcc IS_X64=1 USE_ASM=1 MY_ASM=uasm || exit 1
1313
;;
1414
i386)
15-
make CC=clang CXX=clang++ -j$((nproc-1)) -f makefile.gcc IS_X86=1 USE_ASM=0
15+
make CC=$CC CXX=$CXX -j$((nproc-1)) -f makefile.gcc IS_X86=1 USE_ASM=0
1616
;;
1717
aarch64)
18-
make CC=clang CXX=clang++ -j$((nproc-1)) -f makefile.gcc IS_ARM64=1 USE_ASM=0
18+
make CC=$CC CXX=$CXX -j$((nproc-1)) -f makefile.gcc IS_ARM64=1 USE_ASM=0
1919
;;
2020
*)
2121
echo "Unknown arch: $ARCH"
@@ -31,6 +31,11 @@ function build() {
3131

3232
export OUTDIR="$PWD/build"
3333
export ARCH=$(arch)
34+
export CC="gcc"
35+
export CXX="g++"
36+
37+
export CC="clang"
38+
export CXX="clang++"
3439
mkdir -p "$OUTDIR"
3540

3641
# standalone, minimalistic (flzma2, zstd)

0 commit comments

Comments
 (0)