Update android toolchain variable to point to root dir and not the bin
authordjsollen <djsollen@google.com>
Mon, 18 Apr 2016 18:01:02 +0000 (11:01 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 18 Apr 2016 18:01:02 +0000 (11:01 -0700)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1900773002

Review URL: https://codereview.chromium.org/1900773002

platform_tools/android/bin/android_gdb_app
platform_tools/android/bin/android_gdb_native
platform_tools/android/bin/android_gdbserver
platform_tools/android/bin/utils/setup_toolchain.sh

index f0879fa..74da0da 100755 (executable)
@@ -35,7 +35,7 @@ adb_pull_if_needed /data/data/com.skia.sample_app/lib/libskia_android.so $GDB_TM
 adb_pull_if_needed /data/data/com.skia.sample_app/lib/libSampleApp.so $GDB_TMP_DIR
 
 echo "Pushing gdbserver..."
-adb_push_if_needed $ANDROID_TOOLCHAIN/../gdbserver /data/local/tmp
+adb_push_if_needed $ANDROID_TOOLCHAIN/gdbserver /data/local/tmp
 
 # Launch the app
 echo "Launching the app..."
@@ -61,7 +61,7 @@ echo "set solib-search-path $GDB_TMP_DIR" >> $GDBSETUP
 
 # Launch gdb client
 echo "Entering gdb client shell"
-GDB_COMMAND=$(command ls "$ANDROID_TOOLCHAIN"/*-gdb | head -n1)
+GDB_COMMAND=$(command ls "$ANDROID_TOOLCHAIN"/bin/*-gdb | head -n1)
 "$GDB_COMMAND" -x $GDBSETUP
 
 # Clean up:
index 417f3a4..c114a3d 100755 (executable)
@@ -45,7 +45,7 @@ GDBSETUP=$GDB_TMP_DIR/gdb.setup
 
 # Launch gdb client
 echo "Entering gdb client shell"
-$ANDROID_TOOLCHAIN/../host_prebuilt/bin/gdb -x $GDBSETUP
+$ANDROID_TOOLCHAIN/host_prebuilt/bin/gdb -x $GDBSETUP
 
 # Clean up:
 # We could 'rm -rf $GDB_TMP_DIR', but doing so would cause subsequent debugging
index d9d1d7e..8e4a6f0 100755 (executable)
@@ -65,7 +65,7 @@ for file in \
 done
 
 echo "Pushing gdbserver..."
-adb_push_if_needed $ANDROID_TOOLCHAIN/../gdbserver /data/local/tmp
+adb_push_if_needed $ANDROID_TOOLCHAIN/gdbserver /data/local/tmp
 
 echo "Setting up port forward"
 $ADB forward "tcp:5039" "tcp:5039"
index 89c245a..50098ba 100755 (executable)
@@ -46,7 +46,7 @@ function default_toolchain() {
   TOOLCHAIN=$ANDROID_ARCH-$NDK-$API
   HOST=`uname | tr '[A-Z]' '[a-z]'`
 
-  exportVar ANDROID_TOOLCHAIN "${TOOLCHAINS}/${TOOLCHAIN}/bin"
+  exportVar ANDROID_TOOLCHAIN "${TOOLCHAINS}/${TOOLCHAIN}"
 
   if [ ! -d "$ANDROID_TOOLCHAIN" ]; then
     mkdir -p $TOOLCHAINS
@@ -78,9 +78,9 @@ if [ -z "$ANDROID_TOOLCHAIN" ]; then
   fi
 fi
 
-GCC=$(command ls $ANDROID_TOOLCHAIN/*-gcc | head -n1)
+GCC=$(command ls $ANDROID_TOOLCHAIN/bin/*-gcc | head -n1)
 if [ -z "$GCC" ]; then
-  echo "ERROR: Could not find Android cross-compiler in: $ANDROID_TOOLCHAIN"
+  echo "ERROR: Could not find Android cross-compiler in: ${ANDROID_TOOLCHAIN}/bin"
   return 1
 fi
 
@@ -149,4 +149,4 @@ if [ $(uname) == "Darwin" ]; then
   ln -sf $ANDROID_TOOLCHAIN_PREFIX-as $ANDROID_TOOLCHAIN/as
 fi
 
-exportVar PATH $ANDROID_TOOLCHAIN:$PATH
+exportVar PATH ${ANDROID_TOOLCHAIN}/bin:${PATH}