| #!/bin/sh |
| # Reject attempts to include or link host paths. |
| if echo " $* " | grep -qE '[[:space:]]-[IL][[:space:]]*(/+usr)?/+((local|X11R6)/+)?(include|lib)'; then |
| echo "$0: poisoned host path detected: $*" >&2 |
| exit 1 |
| fi |
| |
| # Android only supports PIEs, but they don't set the default PIE behavior in |
| # the compiler, so we need to manually add the flags. |
| case " $* " in |
| *" -fPIC "*|*" -fpic "*|*" -fPIE "*|*" -fpie "*|*" -shared "*|*" -static "*|*" -pie "*) ;; |
| *) set -- -fpie -pie "$@" |
| esac |
| |
| exec \ |
| "${ANDROID_TOOLCHAIN}/@CXX@" \ |
| @CXXFLAGS@ \ |
| @LDFLAGS@ \ |
| --sysroot "${ANDROID_PRODUCT_OUT}/@ROOT_SUBDIR@" \ |
| -Wl,--enable-new-dtags,-rpath,/system/usr/@LIBDIR@ \ |
| -Wl,-lc++ \ |
| -frtti \ |
| "$@" |