Home | History | Annotate | Download | only in tests
      1 #!/bin/sh
      2 
      3 DEVICE_arm="$1"
      4 DEVICE_x86="$2"
      5 DEVICE_mips="$3"
      6 
      7 LLVM_VERSION=3.4
      8 
      9 MODES="--static --shared"
     10 
     11 echo ================  llvm-libc++
     12 
     13   cd $NDK
     14   echo "### make standalone toolchain"
     15   TOOLCHAIN_DIR_ARM=/tmp/ndk-$USER/android-ndk-api14-arm-4.8-clang${LLVM_VERSION}-libc++
     16   TOOLCHAIN_DIR_X86=/tmp/ndk-$USER/android-ndk-api14-x86-4.8-clang${LLVM_VERSION}-libc++
     17   TOOLCHAIN_DIR_MIPS=/tmp/ndk-$USER/android-ndk-api14-mips-4.8-clang${LLVM_VERSION}-libc++
     18   TOOLCHAIN49_DIR_ARM=/tmp/ndk-$USER/android-ndk-api14-arm-4.9-clang${LLVM_VERSION}-libc++
     19   TOOLCHAIN49_DIR_X86=/tmp/ndk-$USER/android-ndk-api14-x86-4.9-clang${LLVM_VERSION}-libc++
     20   TOOLCHAIN49_DIR_MIPS=/tmp/ndk-$USER/android-ndk-api14-mips-4.9-clang${LLVM_VERSION}-libc++
     21 
     22   ./build/tools/make-standalone-toolchain.sh --platform=android-14 --llvm-version=${LLVM_VERSION} \
     23         --install-dir=$TOOLCHAIN_DIR_ARM --toolchain=arm-linux-androideabi-4.8 --stl=libc++
     24   ./build/tools/make-standalone-toolchain.sh --platform=android-14 --llvm-version=${LLVM_VERSION} \
     25         --install-dir=$TOOLCHAIN_DIR_MIPS --toolchain=mipsel-linux-android-4.8 --stl=libc++
     26   ./build/tools/make-standalone-toolchain.sh --platform=android-14 --llvm-version=${LLVM_VERSION} \
     27         --install-dir=$TOOLCHAIN_DIR_X86 --toolchain=x86-4.8 --stl=libc++
     28   ./build/tools/make-standalone-toolchain.sh --platform=android-14 --llvm-version=${LLVM_VERSION} \
     29         --install-dir=$TOOLCHAIN49_DIR_ARM --toolchain=arm-linux-androideabi-4.9 --stl=libc++
     30   ./build/tools/make-standalone-toolchain.sh --platform=android-14 --llvm-version=${LLVM_VERSION} \
     31         --install-dir=$TOOLCHAIN49_DIR_MIPS --toolchain=mipsel-linux-android-4.9 --stl=libc++
     32   ./build/tools/make-standalone-toolchain.sh --platform=android-14 --llvm-version=${LLVM_VERSION} \
     33         --install-dir=$TOOLCHAIN49_DIR_X86 --toolchain=x86-4.9 --stl=libc++
     34 
     35   cd $NDK/sources/cxx-stl/llvm-libc++/libcxx/test
     36 
     37   for MODE in $MODES; do
     38     if [ -z "$DEVICE_arm" ]; then
     39       echo "### clang${LLVM_VERSION} armeabi-v7a: no device"
     40     else
     41       echo "### clang${LLVM_VERSION} armeabi-v7a"
     42       ADB="adb -s $DEVICE_arm" PATH=$TOOLCHAIN_DIR_ARM/bin:$PATH \
     43         ./testit_android --abi=armeabi-v7a --cxx=arm-linux-androideabi-clang++ $MODE
     44     fi
     45 
     46     if [ -z "$DEVICE_x86" ]; then
     47       echo "### clang${LLVM_VERSION} x86: no device"
     48     else
     49       echo "### clang${LLVM_VERSION} x86"
     50       ADB="adb -s $DEVICE_x86" PATH=$TOOLCHAIN_DIR_X86/bin:$PATH \
     51         ./testit_android --abi=x86 --cxx=i686-linux-android-clang++ $MODE
     52     fi
     53 
     54     if [ -z "$DEVICE_mips" ]; then
     55       echo "### clang${LLVM_VERSION} mips: no device"
     56     else
     57       echo "### clang${LLVM_VERSION} mips"
     58       ADB="adb -s $DEVICE_mips" PATH=$TOOLCHAIN_DIR_MIPS/bin:$PATH \
     59         ./testit_android --abi=mips --cxx=mipsel-linux-android-clang++ $MODE
     60     fi
     61 
     62     if [ -z "$DEVICE_arm" ]; then
     63       echo "### gcc4.9 armeabi-v7a: no device"
     64     else
     65       echo "### gcc4.9 armeabi-v7a"
     66       ADB="adb -s $DEVICE_arm" PATH=$TOOLCHAIN49_DIR_ARM/bin:$PATH \
     67         ./testit_android --abi=armeabi-v7a $MODE
     68     fi
     69 
     70     if [ -z "$DEVICE_x86" ]; then
     71       echo "### gcc4.9 x86: no device"
     72     else
     73       echo "### gcc4.9 x86"
     74       ADB="adb -s $DEVICE_x86" PATH=$TOOLCHAIN49_DIR_X86/bin:$PATH \
     75         ./testit_android --abi=x86 $MODE
     76     fi
     77 
     78     if [ -z "$DEVICE_mips" ]; then
     79       echo "### gcc4.9 mips: no device"
     80     else
     81       echo "### gcc4.9 mips"
     82       ADB="adb -s $DEVICE_mips" PATH=$TOOLCHAIN49_DIR_MIPS/bin:$PATH \
     83         ./testit_android --abi=mips $MODE
     84     fi
     85 
     86     if [ -z "$DEVICE_arm" ]; then
     87       echo "### gcc4.8 armeabi-v7a: no device"
     88     else
     89       echo "### gcc4.8 armeabi-v7a"
     90       ADB="adb -s $DEVICE_arm" PATH=$TOOLCHAIN_DIR_ARM/bin:$PATH \
     91         ./testit_android --abi=armeabi-v7a $MODE
     92     fi
     93 
     94     if [ -z "$DEVICE_x86" ]; then
     95       echo "### gcc4.8 x86: no device"
     96     else
     97       echo "### gcc4.8 x86"
     98       ADB="adb -s $DEVICE_x86" PATH=$TOOLCHAIN_DIR_X86/bin:$PATH \
     99         ./testit_android --abi=x86 $MODE
    100     fi
    101 
    102     if [ -z "$DEVICE_mips" ]; then
    103       echo "### gcc4.8 mips: no device"
    104     else
    105       echo "### gcc4.8 mips"
    106       ADB="adb -s $DEVICE_mips" PATH=$TOOLCHAIN_DIR_MIPS/bin:$PATH \
    107         ./testit_android --abi=mips $MODE
    108     fi
    109   done
    110