From b89cdef10703001510919b8ed979663b670abe7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 24 Mar 2020 23:52:58 +0200 Subject: [PATCH] build-llvm: Generalize the build command --- build-llvm.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build-llvm.sh b/build-llvm.sh index c437fe5..a0cc314 100755 --- a/build-llvm.sh +++ b/build-llvm.sh @@ -71,6 +71,7 @@ fi if [ -n "$(which ninja)" ]; then CMAKE_GENERATOR="Ninja" NINJA=1 + BUILDCMD=ninja else : ${CORES:=$(nproc 2>/dev/null)} : ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)} @@ -83,6 +84,7 @@ else *) ;; esac + BUILDCMD=make fi if [ -n "$HOST" ]; then @@ -179,10 +181,6 @@ cmake \ $CMAKEFLAGS \ .. -if [ -n "$NINJA" ]; then - ninja ${CORES+-j$CORES} install/strip -else - make -j$CORES install/strip -fi +$BUILDCMD ${CORES+-j$CORES} install/strip cp ../LICENSE.TXT $PREFIX