Home | History | Annotate | Download | only in buildcmds
      1 #!/bin/bash
      2 CXX=$1
      3 ARGS=${*:2}
      4 DIR=external/libcxx/buildcmds
      5 echo $ANDROID_BUILD_TOP/$CXX > $DIR/cxx_under_test
      6 
      7 echo $ARGS | grep -P '\S+\.cpp\b' > /dev/null
      8 if [ $? -eq 0 ]; then
      9   echo $ARGS | perl -ne 's/\S+\.cpp\b/%SOURCE%/; print' \
     10              | perl -ne 's/\S+\.o\b/%OUT%/; print' > $DIR/cxx.cmds
     11 else
     12   echo $ARGS | perl -ne 's/out\/\S+\/EXECUTABLES\/\S+\.o\b/%SOURCE%/; print' \
     13              | perl -ne 's/-o\s+\S+\b/-o %OUT%/; print' > $DIR/link.cmds
     14 fi
     15 
     16 $CXX $ARGS
     17