replicant-vendor_replicant/build-toolchain
Wolfgang Wiedmeyer ed5cdba81f 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>
2016-01-06 12:55:23 +01:00

16 lines
339 B
Bash
Executable File

#!/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