From fc1b1ba1109db28533f53fdf3587f84156cb754d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 19 Apr 2021 14:08:00 +0300 Subject: [PATCH] install-wrappers: Use llvm-windres if available If the llvm-windres tool is available, use that instead of our own wrapper that calls clang, llvm-rc and llvm-cvtres separately. --- install-wrappers.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install-wrappers.sh b/install-wrappers.sh index 6b2fea0..50e1d4e 100755 --- a/install-wrappers.sh +++ b/install-wrappers.sh @@ -93,9 +93,13 @@ for arch in $ARCHS; do fi ln -sf $link_target$EXEEXT $arch-w64-$target_os-$exec$EXEEXT || true done - for exec in windres; do - ln -sf $exec-wrapper$EXEEXT $arch-w64-$target_os-$exec$EXEEXT - done + if [ -f "llvm-windres$EXEEXT" ]; then + # windres can't use llvm-wrapper, as that loses the original + # target arch prefix. + ln -sf llvm-windres$EXEEXT $arch-w64-$target_os-windres$EXEEXT + else + ln -sf windres-wrapper$EXEEXT $arch-w64-$target_os-windres$EXEEXT + fi for exec in ld objdump dlltool; do ln -sf $exec-wrapper.sh $arch-w64-$target_os-$exec done