1 #!/bin/bash -e 2 3 # Copy binaries 4 for b in bin/*; do 5 file=`basename $b` 6 # Don't copy symlinks like clang++ or directories 7 if test -h $b || test -d $b; then 8 echo Skipping $file 9 else 10 echo Copying $file 11 cp -a `find ${ANDROID_HOST_OUT}/bin -name $file` $b 12 strip $b 13 fi 14 done 15 16 # Copy static analyzer scripts. 17 echo Copying static analyzer tools 18 rm -rf tools/* 19 mkdir -p tools 20 cp -a ${ANDROID_BUILD_TOP}/external/clang/tools/scan-build tools 21 cp -a ${ANDROID_BUILD_TOP}/external/clang/tools/scan-view tools 22 23 # Copy libraries 24 echo Copying libc++.dylib 25 cp -a ${ANDROID_HOST_OUT}/lib/libc++.dylib lib/ 26 cp -a ${ANDROID_HOST_OUT}/lib64/libc++.dylib lib64/ 27 28 # Copy header files 29 rm -rf lib/clang/*/include/* 30 for i in `find ${ANDROID_BUILD_TOP}/external/clang/lib/Headers -mindepth 1 ! -name \*.mk -a ! -name Makefile -a ! -name CMakeLists.txt`; do 31 echo Copying `basename $i` 32 cp -a $i lib/clang/*/include/ 33 done 34 35 # Copy over stdatomic.h from bionic 36 echo Copying stdatomic.h 37 cp -a ${ANDROID_BUILD_TOP}/bionic/libc/include/stdatomic.h lib/clang/*/include/ 38 39 echo Copying arm_neon.h 40 cp -a `find ${ANDROID_PRODUCT_OUT} -name arm_neon.h` lib/clang/*/include 41 42