Home | History | Annotate | Download | only in 3.8
      1 #!/bin/bash -e
      2 
      3 export FORCE_BUILD_LLVM_COMPONENTS=true
      4 export SKIP_LLVM_TESTS=true
      5 
      6 CLANG_DIR=$ANDROID_BUILD_TOP/external/clang
      7 LLVM_DIR=$ANDROID_BUILD_TOP/external/llvm
      8 COMPILER_RT_DIR=$ANDROID_BUILD_TOP/external/compiler-rt
      9 LIBCXX_DIR=$ANDROID_BUILD_TOP/external/libcxx
     10 
     11 NUM_CORES=`cat /proc/cpuinfo | grep processor | tail -n 1 | cut -f 2 -d :`
     12 NUM_CORES=$(($NUM_CORES+1))
     13 echo "Using $NUM_CORES cores"
     14 
     15 cd $ANDROID_BUILD_TOP
     16 source build/envsetup.sh
     17 lunch aosp_arm-userdebug
     18 
     19 HOST_BIN=out/host/linux-x86/bin
     20 INTERESTING="\
     21   $HOST_BIN/clang \
     22   $HOST_BIN/FileCheck \
     23   $HOST_BIN/llvm-as \
     24   $HOST_BIN/llvm-dis \
     25   $HOST_BIN/llvm-link \
     26   out/target/product/generic/obj/include/clang/arm_neon.h \
     27 "
     28 
     29 
     30 
     31 make -j$NUM_CORES $INTERESTING || exit 1
     32 cd $LLVM_DIR && mma -j$NUM_CORES || exit 1
     33 cd $CLANG_DIR && mma -j$NUM_CORES || exit 1
     34 cd $LIBCXX_DIR && mma -j$NUM_CORES || exit 1
     35 cd $COMPILER_RT_DIR && mma -j$NUM_CORES || exit 1
     36 
     37 exit 0
     38