Fix the ninja build on mac to use nm/readelf from the Android toolchain instead of the host system.
BUG=skia:2338
R=mtklein@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/216793007
git-svn-id: http://skia.googlecode.com/svn/trunk@13985 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/platform_tools/android/bin/android_setup.sh b/platform_tools/android/bin/android_setup.sh
index 7a44317..d29a070 100755
--- a/platform_tools/android/bin/android_setup.sh
+++ b/platform_tools/android/bin/android_setup.sh
@@ -152,6 +152,13 @@
export RANLIB="$ANDROID_TOOLCHAIN_PREFIX-ranlib"
export OBJCOPY="$ANDROID_TOOLCHAIN_PREFIX-objcopy"
export STRIP="$ANDROID_TOOLCHAIN_PREFIX-strip"
+
+ # create symlinks for nm & readelf and add them to the path so that the ninja
+ # build uses them instead of attempting to use the one on the system
+ ln -sf $ANDROID_TOOLCHAIN_PREFIX-nm $ANDROID_TOOLCHAIN/nm
+ ln -sf $ANDROID_TOOLCHAIN_PREFIX-readelf $ANDROID_TOOLCHAIN/readelf
+ export PATH=$ANDROID_TOOLCHAIN:$PATH
+
}
# Helper function to configure the GYP defines to the appropriate values