From 3cf884f8b7a7bd2901b4d2e50554dc611a193776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 27 May 2024 13:00:17 +0300 Subject: [PATCH] install-wrappers: Prefer the CRT's implementation of printf functions This avoids bloating the wrapper executables, when built for msvcrt (where the default is to enable __USE_MINGW_ANSI_STDIO when targeting C99 or newer). --- install-wrappers.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install-wrappers.sh b/install-wrappers.sh index 5114ff6..31ed31e 100755 --- a/install-wrappers.sh +++ b/install-wrappers.sh @@ -115,6 +115,10 @@ if [ -n "$EXEEXT" ]; then CLANG_MAJOR=$(basename $(echo $PREFIX/lib/clang/* | awk '{print $NF}') | cut -f 1 -d .) WRAPPER_FLAGS="$WRAPPER_FLAGS -municode -DCLANG=\"clang-$CLANG_MAJOR\"" WRAPPER_FLAGS="$WRAPPER_FLAGS -DCLANG_SCAN_DEPS=\"clang-scan-deps-real\"" + # The wrappers may use printf, but doesn't use anything that specifically + # needs full ansi compliance - prefer leaner binaries by using the CRT + # implementations. + WRAPPER_FLAGS="$WRAPPER_FLAGS -D__USE_MINGW_ANSI_STDIO=0" fi mkdir -p "$PREFIX/bin"