add script to build the toolchain

This is just an initial version.
It builds clang without fancy options for now.

Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
This commit is contained in:
Wolfgang Wiedmeyer 2016-01-06 12:55:23 +01:00
parent 920cc2e9a7
commit ed5cdba81f

15
build-toolchain Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
set -e
BASEDIR=$(pwd)
mkdir -p $BASEDIR/toolchain/clang
cd $BASEDIR/toolchain/clang
# build llvm and clang binaries
cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;ARM" \
-DLLVM_EXTERNAL_CLANG_SOURCE_DIR=../../external/clang \
-DCMAKE_C_FLAGS="-O2" ../../external/llvm/
make -j $(nproc)
cd $BASEDIR