Make it possible to override the default win32 target version and mingw-w64 via environment variables

This makes it easier to change the default win32 target when using
build-all.sh, and also makes it possible to change the version of
mingw-w64 that is used, which wasn't possible at all before.
This commit is contained in:
Martin Storsjö committed 2019-12-19 22:21:02 +02:00
1 parent f862f91c1c
commit cd8e71d0e7
1 file changed
+3 -2
+3 -2
View File
@@ -2,8 +2,9 @@
set -e
DEFAULT_WIN32_WINNT=0x601
: ${DEFAULT_WIN32_WINNT:=0x601}
: ${DEFAULT_MSVCRT:=ucrt}
: ${MINGW_W64_VERSION:=0a1d495478d8ed1a94fc77b9dbb428b7e0372588}
unset HOST
while [ $# -gt 0 ]; do
@@ -58,7 +59,7 @@ cd mingw-w64
if [ -n "$SYNC" ] || [ -n "$CHECKOUT" ]; then
[ -z "$SYNC" ] || git fetch
git checkout 0a1d495478d8ed1a94fc77b9dbb428b7e0372588
git checkout $MINGW_W64_VERSION
fi
# If crosscompiling the toolchain itself, we already have a mingw-w64