Home | History | Annotate | Download | only in 3.6
      1 #!/bin/bash -e
      2 
      3 echo Copying sanitizer headers
      4 cp -a ${ANDROID_BUILD_TOP}/external/compiler-rt/include/sanitizer lib/clang/*/include/
      5 
      6 echo Copying sanitizer libraries
      7 LIBDEST=$(echo lib/clang/*)/lib/linux
      8 OBJ32=${ANDROID_HOST_OUT}/obj32/STATIC_LIBRARIES
      9 OBJ64=${ANDROID_HOST_OUT}/obj/STATIC_LIBRARIES
     10 
     11 LIBS='libasan libasan_cxx libubsan_standalone libubsan_standalone_cxx'
     12 for lib in $LIBS; do
     13   libname=${lib:3} # Strip 'lib' prefix.
     14   lib32=${LIBDEST}/libclang_rt.${libname}-i686.a
     15   lib64=${LIBDEST}/libclang_rt.${libname}-x86_64.a
     16 
     17   cp -a ${OBJ32}/${lib}_intermediates/${lib}.a ${lib32}
     18   cp -a ${OBJ64}/${lib}_intermediates/${lib}.a ${lib64}
     19 done
     20 
     21 LIBS64='libtsan libtsan_cxx'
     22 for lib in $LIBS64; do
     23   libname=${lib:3} # Strip 'lib' prefix.
     24   lib64=${LIBDEST}/libclang_rt.${libname}-x86_64.a
     25 
     26   cp -a ${OBJ64}/${lib}_intermediates/${lib}.a ${lib64}
     27 done
     28