build-mingw-w64: Add a CHECKOUT_ONLY codepath

This commit is contained in:
Martin Storsjö committed 2020-09-16 00:03:57 +03:00
1 parent 308f7227c5
commit 57b7ffd84d
2 files changed
+26 -18

No files matched your search

+4
View File
@@ -30,6 +30,10 @@ export PATH="$PREFIX/bin:$PATH"
: ${CORES:=4}
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
if [ ! -d mingw-w64 ] || [ -n "$SYNC" ]; then
CHECKOUT_ONLY=1 ./build-mingw-w64.sh
fi
cd mingw-w64/mingw-w64-libraries
for lib in winpthreads winstorecompat; do
cd $lib
+22 -18
View File
@@ -41,19 +41,35 @@ while [ $# -gt 0 ]; do
esac
shift
done
if [ -z "$PREFIX" ]; then
echo $0 [--skip-include-triplet-prefix] [--with-default-win32-winnt=0x601] [--with-default-msvcrt=ucrt] [--host=<triple>] dest
exit 1
if [ -z "$CHECKOUT_ONLY" ]; then
if [ -z "$PREFIX" ]; then
echo $0 [--skip-include-triplet-prefix] [--with-default-win32-winnt=0x601] [--with-default-msvcrt=ucrt] [--host=<triple>] dest
exit 1
fi
mkdir -p "$PREFIX"
PREFIX="$(cd "$PREFIX" && pwd)"
fi
if [ ! -d mingw-w64 ]; then
git clone git://git.code.sf.net/p/mingw-w64/mingw-w64
CHECKOUT=1
fi
cd mingw-w64
if [ -n "$SYNC" ] || [ -n "$CHECKOUT" ]; then
[ -z "$SYNC" ] || git fetch
git checkout $MINGW_W64_VERSION
fi
[ -z "$CHECKOUT_ONLY" ] || exit 0
MAKE=make
if [ "$(which gmake)" != "" ]; then
MAKE=gmake
fi
mkdir -p "$PREFIX"
PREFIX="$(cd "$PREFIX" && pwd)"
ORIGPATH="$PATH"
if [ -z "$HOST" ]; then
# The newly built toolchain isn't crosscompiled; add it to the path.
@@ -69,18 +85,6 @@ fi
: ${CORES:=4}
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
if [ ! -d mingw-w64 ]; then
git clone git://git.code.sf.net/p/mingw-w64/mingw-w64
CHECKOUT=1
fi
cd mingw-w64
if [ -n "$SYNC" ] || [ -n "$CHECKOUT" ]; then
[ -z "$SYNC" ] || git fetch
git checkout $MINGW_W64_VERSION
fi
# If crosscompiling the toolchain itself, we already have a mingw-w64
# runtime and don't need to rebuild it.
if [ -z "$HOST" ]; then