Skip to content

Commit

Permalink
wrappers: Remove the dlltool wrapper
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mstorsjo committed Sep 17, 2021
1 parent 671c408 commit 42d2eb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 71 deletions.
5 changes: 2 additions & 3 deletions install-wrappers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
68 changes: 0 additions & 68 deletions wrappers/dlltool-wrapper.c

This file was deleted.

0 comments on commit 42d2eb7

Please sign in to comment.