| #!/bin/sh |
| if base=$(readlink "$0" 2>/dev/null); then |
| case $base in |
| /*) base=$(readlink -f "$0" 2>/dev/null);; # if $0 is abspath symlink, make symlink fully resolved. |
| *) base=$(dirname "$0")/"${base}";; |
| esac |
| else |
| case $0 in |
| /*) base=$0;; |
| *) base=${PWD:-`pwd`}/$0;; |
| esac |
| fi |
| basedir=${base%/*} |
| # TODO(crbug/1003841): Remove LD_ARGV0 once |
| # ld.so supports forwarding the binary name. |
| LD_ARGV0="$0" LD_ARGV0_REL="../usr/bin/clang-12" exec "${basedir}/../../lib/ld-linux-x86-64.so.2" --library-path "${basedir}/../lib64:${basedir}/../../lib" --inhibit-rpath '' "${base}.elf" "$@" |