build-mingw-w64: Pass --disable-dependency-tracking when configuring mingw-w64-crt on MSYS2
Configuring the mingw-w64-crt build takes a really long time on MSYS2; the generating Makefile phase takes easily 4-5 minutes, when the rest of configure runs in a matter of seconds. By passing --disable-dependency-tracking, the whole configure for mingw-w64-crt takes 11-14 seconds where it previously took many mnutes. This comes with the drawback that these build directories aren't suitable for incremental development (unless manual care is taken to rebuild all necessary files), but these builds are mostly done for non-interactive building. Thanks to Jeremy Drake for realizing this optimization opportunity, and LIU Hao for making me aware of it.
This commit is contained in:
1 parent
1ca5ecf22f
commit
d5c9fb3e04
1 file changed
+7
-1
+7
-1
@@ -74,6 +74,12 @@ if command -v gmake >/dev/null; then
|
||||
MAKE=gmake
|
||||
fi
|
||||
|
||||
case $(uname) in
|
||||
MINGW*|MSYS*)
|
||||
CRT_CONFIG_FLAGS="--disable-dependency-tracking"
|
||||
;;
|
||||
esac
|
||||
|
||||
export PATH="$PREFIX/bin:$PATH"
|
||||
|
||||
unset CC
|
||||
@@ -126,7 +132,7 @@ for arch in $ARCHS; do
|
||||
;;
|
||||
esac
|
||||
FLAGS="$FLAGS --with-default-msvcrt=$DEFAULT_MSVCRT"
|
||||
../configure --host=$arch-w64-mingw32 --prefix="$PREFIX/$arch-w64-mingw32" $FLAGS $CFGUARD_FLAGS
|
||||
../configure --host=$arch-w64-mingw32 --prefix="$PREFIX/$arch-w64-mingw32" $FLAGS $CFGUARD_FLAGS $CRT_CONFIG_FLAGS
|
||||
$MAKE -j$CORES
|
||||
$MAKE install
|
||||
cd ..
|
||||
|
||||
Reference in new issue
Block a user