wrappers: Remove the dlltool wrapper

Since LLVM 13, llvm-dlltool can imply the target architecture from
a triple prefix on the tool name, so there's no more need for a
wrapper.

The *-dlltool tools are now symlinks to the main llvm-dlltool
executable. In the Windows distribution, the *-dlltool.exe used to be
copies of dlltool-wrapper.exe (which is small; 15 KB). Now they
will instead be copies of llvm-dlltool.exe. Luckily, thanks to
building with -DLLVM_LINK_LLVM_DYLIB=ON by default, llvm-dlltool.exe
is only a mere 65 KB, while it used to be much larger, e.g. around
11 MB in older releases.
This commit is contained in:
Martin Storsjö committed 2021-09-17 11:09:35 +03:00
1 parent 671c408b9b
commit 42d2eb7346
2 files changed
+2 -71

No files matched your search

+2 -3
View File
@@ -69,7 +69,6 @@ if [ -n "$HOST" ]; then
done
fi
$CC wrappers/clang-target-wrapper.c -o "$PREFIX/bin/clang-target-wrapper$EXEEXT" -O2 -Wl,-s $WRAPPER_FLAGS
$CC wrappers/dlltool-wrapper.c -o "$PREFIX/bin/dlltool-wrapper$EXEEXT" -O2 -Wl,-s $WRAPPER_FLAGS
$CC wrappers/llvm-wrapper.c -o "$PREFIX/bin/llvm-wrapper$EXEEXT" -O2 -Wl,-s $WRAPPER_FLAGS
if [ -n "$EXEEXT" ]; then
# For Windows, we should prefer the executable wrapper, which also works
@@ -93,10 +92,10 @@ for arch in $ARCHS; do
fi
ln -sf $link_target$EXEEXT $arch-w64-$target_os-$exec$EXEEXT || true
done
# windres can't use llvm-wrapper, as that loses the original
# windres and dlltool can't use llvm-wrapper, as that loses the original
# target arch prefix.
ln -sf llvm-windres$EXEEXT $arch-w64-$target_os-windres$EXEEXT
ln -sf dlltool-wrapper$EXEEXT $arch-w64-$target_os-dlltool$EXEEXT
ln -sf llvm-dlltool$EXEEXT $arch-w64-$target_os-dlltool$EXEEXT
for exec in ld objdump; do
ln -sf $exec-wrapper.sh $arch-w64-$target_os-$exec
done