Build llvm with ninja, if available
This speeds up incremental builds.
This commit is contained in:
1 parent
7ae7b57d00
commit
58ba889792
2 files changed
+11
-1
No files matched your search
+1
-1
@@ -2,7 +2,7 @@ FROM ubuntu:16.04
|
|||||||
|
|
||||||
RUN apt-get update -qq && apt-get install -qqy \
|
RUN apt-get update -qq && apt-get install -qqy \
|
||||||
git wget bzip2 file unzip libtool pkg-config cmake build-essential \
|
git wget bzip2 file unzip libtool pkg-config cmake build-essential \
|
||||||
automake yasm gettext autopoint vim python git-svn
|
automake yasm gettext autopoint vim python git-svn ninja-build
|
||||||
|
|
||||||
|
|
||||||
RUN git config --global user.name "LLVM MinGW" && \
|
RUN git config --global user.name "LLVM MinGW" && \
|
||||||
|
|||||||
@@ -36,13 +36,23 @@ if [ ! -d llvm ]; then
|
|||||||
cd ../../..
|
cd ../../..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(which ninja)" != "" ]; then
|
||||||
|
CMAKE_GENERATOR="-G Ninja"
|
||||||
|
NINJA=1
|
||||||
|
fi
|
||||||
|
|
||||||
cd llvm
|
cd llvm
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
cmake \
|
cmake \
|
||||||
|
$CMAKE_GENERATOR \
|
||||||
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
|
-DCMAKE_INSTALL_PREFIX="$PREFIX" \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DLLVM_ENABLE_ASSERTIONS=ON \
|
-DLLVM_ENABLE_ASSERTIONS=ON \
|
||||||
-DLLVM_TARGETS_TO_BUILD="ARM;AArch64;X86" \
|
-DLLVM_TARGETS_TO_BUILD="ARM;AArch64;X86" \
|
||||||
..
|
..
|
||||||
|
if [ -n "$NINJA" ]; then
|
||||||
|
ninja install
|
||||||
|
else
|
||||||
make -j$CORES install
|
make -j$CORES install
|
||||||
|
fi
|
||||||
Reference in new issue
Block a user