ar_to_bc.sh: replace readlink -f with custom relative path resolution
authorFangrui Song <maskray@google.com>
Tue, 2 Apr 2019 04:58:29 +0000 (04:58 +0000)
committerFangrui Song <maskray@google.com>
Tue, 2 Apr 2019 04:58:29 +0000 (04:58 +0000)
commit9d1449246dd76a2e8c94bbeae055318356ee301a
tree44c0246c7fe13a99db03a4bd7e504f8f4e090a55
parent60a8816c2fc8952251f635ea15dde678d186ea78
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.

llvm-svn: 357450
compiler-rt/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh