[asan] asan_device_setup: extend search path
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 5 Jun 2014 12:49:35 +0000 (12:49 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 5 Jun 2014 12:49:35 +0000 (12:49 +0000)
In standalone build asan-rt is stored in yet another path.

llvm-svn: 210259

compiler-rt/lib/asan/scripts/asan_device_setup

index db6346b..261e2c6 100755 (executable)
@@ -97,8 +97,8 @@ elif [[ -f "$HERE/$ASAN_RT" ]]; then
     ASAN_RT_PATH="$HERE"
 elif [[ $(basename "$HERE") == "bin" ]]; then
     # We could be in the toolchain's base directory.
-    # Consider ../lib and ../lib/clang/$VERSION/lib/linux.
-    P=$(ls "$HERE"/../lib/"$ASAN_RT" "$HERE"/../lib/clang/*/lib/linux/"$ASAN_RT" 2>/dev/null | sort | tail -1)
+    # Consider ../lib, ../lib/asan and ../lib/clang/$VERSION/lib/linux.
+    P=$(ls "$HERE"/../lib/"$ASAN_RT" "$HERE"/../lib/asan/"$ASAN_RT" "$HERE"/../lib/clang/*/lib/linux/"$ASAN_RT" 2>/dev/null | sort | tail -1)
     if [[ -n "$P" ]]; then
         ASAN_RT_PATH="$(dirname "$P")"
     fi