Skip to content

Commit 3cf884f

Browse files
committed
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).
1 parent ebde97f commit 3cf884f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

install-wrappers.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ if [ -n "$EXEEXT" ]; then
115115
CLANG_MAJOR=$(basename $(echo $PREFIX/lib/clang/* | awk '{print $NF}') | cut -f 1 -d .)
116116
WRAPPER_FLAGS="$WRAPPER_FLAGS -municode -DCLANG=\"clang-$CLANG_MAJOR\""
117117
WRAPPER_FLAGS="$WRAPPER_FLAGS -DCLANG_SCAN_DEPS=\"clang-scan-deps-real\""
118+
# The wrappers may use printf, but doesn't use anything that specifically
119+
# needs full ansi compliance - prefer leaner binaries by using the CRT
120+
# implementations.
121+
WRAPPER_FLAGS="$WRAPPER_FLAGS -D__USE_MINGW_ANSI_STDIO=0"
118122
fi
119123

120124
mkdir -p "$PREFIX/bin"

0 commit comments

Comments
 (0)