summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/symbolizer/scripts
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-04-02 04:58:29 +0000
committerFangrui Song <maskray@google.com>2019-04-02 04:58:29 +0000
commit81fd3b5489febf86f4bfd7e18f7daa5a78c1cd39 (patch)
tree598169e6c7e11a11b2543fb40f969955426594eb /lib/sanitizer_common/symbolizer/scripts
parent2a38e4be41162e111652ec2612ba273aa5f50e5a (diff)
downloadcompiler-rt-81fd3b5489febf86f4bfd7e18f7daa5a78c1cd39.tar.gz
ar_to_bc.sh: replace readlink -f with custom relative path resolution
llvm-ar is a crunchgen-style executable dispatching to dlltool,ranlib,lib,ar based on argv[0]. In our content-addressable storage, readlink -f resolves paths to some digest and thus lost the original "llvm-ar" filename. Replace it with a custom path resolution to fix the problem. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@357450 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/symbolizer/scripts')
-rwxr-xr-xlib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh b/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh
index 788cef85a..7ce901e8a 100755
--- a/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh
+++ b/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh
@@ -9,8 +9,8 @@ if [ "$#" -le 1 ]; then
usage
fi
-AR=$(readlink -f $AR)
-LINK=$(readlink -f $LINK)
+[[ AR == /* ]] || AR=$PWD/$AR
+[[ LINK == /* ]] || LINK=$PWD/$LINK
INPUTS=
OUTPUT=