build-llvm: Generalize the build command
This commit is contained in:
1 parent
13e441d60e
commit
b89cdef107
1 file changed
+3
-5
+3
-5
@@ -71,6 +71,7 @@ fi
|
|||||||
if [ -n "$(which ninja)" ]; then
|
if [ -n "$(which ninja)" ]; then
|
||||||
CMAKE_GENERATOR="Ninja"
|
CMAKE_GENERATOR="Ninja"
|
||||||
NINJA=1
|
NINJA=1
|
||||||
|
BUILDCMD=ninja
|
||||||
else
|
else
|
||||||
: ${CORES:=$(nproc 2>/dev/null)}
|
: ${CORES:=$(nproc 2>/dev/null)}
|
||||||
: ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)}
|
: ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)}
|
||||||
@@ -83,6 +84,7 @@ else
|
|||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
BUILDCMD=make
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$HOST" ]; then
|
if [ -n "$HOST" ]; then
|
||||||
@@ -179,10 +181,6 @@ cmake \
|
|||||||
$CMAKEFLAGS \
|
$CMAKEFLAGS \
|
||||||
..
|
..
|
||||||
|
|
||||||
if [ -n "$NINJA" ]; then
|
$BUILDCMD ${CORES+-j$CORES} install/strip
|
||||||
ninja ${CORES+-j$CORES} install/strip
|
|
||||||
else
|
|
||||||
make -j$CORES install/strip
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp ../LICENSE.TXT $PREFIX
|
cp ../LICENSE.TXT $PREFIX
|
||||||
Reference in new issue
Block a user