2016-01-06 11:55:23 +00:00
|
|
|
#!/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
|
2016-01-07 17:47:35 +00:00
|
|
|
|
|
|
|
#TODO: copy include header (now in /usr/include)
|
|
|
|
# include patch for binutils
|
|
|
|
# enable optimization for llvm (more stuff?)
|
|
|
|
# test with gcc-4.8 binaries if there are errors
|
2016-01-08 17:59:19 +00:00
|
|
|
# document renaming of binaries of cross compiler build and export flag
|
|
|
|
# review other prebuilt tools from misc, tools, devtools and sdk
|
|
|
|
# search for bin directories in external and remove binaries
|