Files
llvm-mingw/install-wrappers.sh
T
Martin Storsjö 1d3f223d29 Don't error out in install-wrappers.sh if some binary tools are missing
If installing on top of a prebuilt win32 release of llvm instead of
building from source, the nm and strings executables are missing,
and MSYS2 errors out when creating a symlink to a file that doesn't
exist (since it does a copy instead of making an actual symlink).
2018-06-19 09:31:57 +03:00

30 lines
666 B
Bash
Executable File

#!/bin/sh
set -e
if [ $# -lt 1 ]; then
echo $0 dest
exit 1
fi
PREFIX="$1"
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
mkdir -p $PREFIX/bin
cp wrappers/*-wrapper.sh $PREFIX/bin
cd $PREFIX/bin
for arch in $ARCHS; do
for exec in clang clang++ gcc g++; do
ln -sf clang-target-wrapper.sh $arch-w64-mingw32-$exec
done
for exec in ar ranlib nm strings; do
ln -sf llvm-$exec $arch-w64-mingw32-$exec || true
done
for exec in strip; do
ln -sf $(which true) $arch-w64-mingw32-$exec
done
for exec in ld objdump windres dlltool; do
ln -sf $exec-wrapper.sh $arch-w64-mingw32-$exec
done
done