From 00c95e73ef4258dbf341168c9ae5b2e59785afb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 14 Sep 2020 17:47:01 +0300 Subject: [PATCH] build-mingw-w64-tools: Add some comments --- build-mingw-w64-tools.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build-mingw-w64-tools.sh b/build-mingw-w64-tools.sh index 735ec7b..09f49b7 100755 --- a/build-mingw-w64-tools.sh +++ b/build-mingw-w64-tools.sh @@ -87,12 +87,18 @@ $MAKE -j$CORES $MAKE install-strip cd .. cd "$PREFIX/bin" +# The build above produced $ANY_ARCH-w64-mingw32-widl, add symlinks to it +# with other prefixes. for arch in $ARCHS; do if [ "$arch" != "$ANY_ARCH" ]; then ln -sf $ANY_ARCH-w64-mingw32-widl$EXEEXT $arch-w64-mingw32-widl$EXEEXT fi done if [ -n "$EXEEXT" ]; then + # In a build of the tools for windows, we also want to provide an + # unprefixed one. If crosscompiling, we know what the native arch is; + # $HOST. If building natively, check the built clang to see what the + # default arch is. if [ -z "$HOST" ] && [ -f clang$EXEEXT ]; then HOST=$(./clang -dumpmachine | sed 's/-.*//')-w64-mingw32 fi