Skip to content

Commit 524b944

Browse files
committed
mingw-msvc
1 parent 9f2c3b5 commit 524b944

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

external_deps/build.sh

+10-9
Original file line numberDiff line numberDiff line change
@@ -1209,26 +1209,27 @@ common_setup_arch() {
12091209
# Lua does use this one, which results in compiler warnings. But this is OK because
12101210
# the Windows build of Lua is only used in developer gamelogic builds, and Microsoft
12111211
# supports %lld since Visual Studio 2013.
1212+
common_setup_windows() {
1213+
LD="${HOST}-ld"
1214+
AR="${HOST}-ar"
1215+
RANLIB="${HOST}-ranlib"
1216+
CFLAGS+=' -D__USE_MINGW_ANSI_STDIO=0'
1217+
CMAKE_TOOLCHAIN="${SCRIPT_DIR}/../cmake/cross-toolchain-mingw${BITNESS}.cmake"
1218+
}
1219+
12121220
common_setup_msvc() {
12131221
LIBS_SHARED='ON'
12141222
LIBS_STATIC='OFF'
12151223
# Libtool bug prevents -static-libgcc from being set in LDFLAGS
12161224
CC="${HOST}-gcc -static-libgcc"
12171225
CXX="${HOST}-g++ -static-libgcc"
1218-
LD="${HOST}-ld"
1219-
AR="${HOST}-ar"
1220-
RANLIB="${HOST}-ranlib"
1221-
CFLAGS+=' -D__USE_MINGW_ANSI_STDIO=0'
1226+
common_setup_windows
12221227
}
12231228

12241229
common_setup_mingw() {
12251230
CC="${HOST}-gcc"
12261231
CXX="${HOST}-g++"
1227-
LD="${HOST}-ld"
1228-
AR="${HOST}-ar"
1229-
RANLIB="${HOST}-ranlib"
1230-
CFLAGS+=' -D__USE_MINGW_ANSI_STDIO=0'
1231-
CMAKE_TOOLCHAIN="${SCRIPT_DIR}/../cmake/cross-toolchain-mingw${BITNESS}.cmake"
1232+
common_setup_windows
12321233
}
12331234

12341235
common_setup_macos() {

0 commit comments

Comments
 (0)