[compiler-rt] r318573 - [asan] Fix asan_device_setup on KitKat.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 17 15:52:34 PST 2017


Author: eugenis
Date: Fri Nov 17 15:52:34 2017
New Revision: 318573

URL: http://llvm.org/viewvc/llvm-project?rev=318573&view=rev
Log:
[asan] Fix asan_device_setup on KitKat.

"ln" from toybox does not understand -f (force) flag.

Modified:
    compiler-rt/trunk/lib/asan/scripts/asan_device_setup

Modified: compiler-rt/trunk/lib/asan/scripts/asan_device_setup
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/scripts/asan_device_setup?rev=318573&r1=318572&r2=318573&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/scripts/asan_device_setup (original)
+++ compiler-rt/trunk/lib/asan/scripts/asan_device_setup Fri Nov 17 15:52:34 2017
@@ -419,15 +419,18 @@ if ! ( cd "$TMPDIRBASE" && diff -qr old/
       install "$TMPDIR/asanwrapper" /system/bin 755
       install "$TMPDIR/asanwrapper64" /system/bin 755
 
-      adb_shell ln -sf $ASAN_RT /system/lib/$ASAN_RT_SYMLINK
-      adb_shell ln -sf $ASAN_RT64 /system/lib64/$ASAN_RT_SYMLINK
+      adb_shell rm -f /system/lib/$ASAN_RT_SYMLINK
+      adb_shell ln -s $ASAN_RT /system/lib/$ASAN_RT_SYMLINK
+      adb_shell rm -f /system/lib64/$ASAN_RT_SYMLINK
+      adb_shell ln -s $ASAN_RT64 /system/lib64/$ASAN_RT_SYMLINK
     else
       install "$TMPDIR/$ASAN_RT" /system/lib 644
       install "$TMPDIR/app_process32" /system/bin 755 $CTX
       install "$TMPDIR/app_process.wrap" /system/bin 755 $CTX
       install "$TMPDIR/asanwrapper" /system/bin 755 $CTX
 
-      adb_shell ln -sf $ASAN_RT /system/lib/$ASAN_RT_SYMLINK
+      adb_shell rm -f /system/lib/$ASAN_RT_SYMLINK
+      adb_shell ln -s $ASAN_RT /system/lib/$ASAN_RT_SYMLINK
 
       adb_shell rm /system/bin/app_process
       adb_shell ln -s /system/bin/app_process.wrap /system/bin/app_process




More information about the llvm-commits mailing list