From c9ae57f3d0f4d9a6568cffc68b876eefba586b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 14 Sep 2020 17:50:52 +0300 Subject: [PATCH] build-mingw-w64-tools: Only install an unprefixed widl if the native arch is one of the target archs --- build-mingw-w64-tools.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build-mingw-w64-tools.sh b/build-mingw-w64-tools.sh index 09f49b7..d7bb1fe 100755 --- a/build-mingw-w64-tools.sh +++ b/build-mingw-w64-tools.sh @@ -103,6 +103,13 @@ if [ -n "$EXEEXT" ]; then HOST=$(./clang -dumpmachine | sed 's/-.*//')-w64-mingw32 fi if [ -n "$HOST" ]; then - ln -sf $HOST-widl$EXEEXT widl$EXEEXT + HOST_ARCH="${HOST%%-*}" + # Only install an unprefixed symlink if $HOST is one of the architectures + # we are installing wrappers for. + case $ARCHS in + *$HOST_ARCH*) + ln -sf $HOST-widl$EXEEXT widl$EXEEXT + ;; + esac fi fi