forked from OSchip/llvm-project
[libc++] Avoid relying on `realpath` being installed on the system
It doesn't appear to be a standard utility.
This commit is contained in:
parent
e95f9a23fa
commit
2408fc2a1e
|
@ -98,6 +98,9 @@ for arg in llvm_root build_dir symbols_dir install_dir sdk architectures version
|
|||
done
|
||||
|
||||
# Allow using relative paths
|
||||
function realpath() {
|
||||
if [[ $1 = /* ]]; then echo "$1"; else echo "$(pwd)/${1#./}"; fi
|
||||
}
|
||||
for arg in llvm_root build_dir symbols_dir install_dir cache; do
|
||||
path="$(realpath "${!arg}")"
|
||||
eval "${arg}=\"${path}\""
|
||||
|
|
Loading…
Reference in New Issue