Skip to content

Commit 8a3f5af

Browse files
committed
Auto merge of #25995 - alexcrichton:msvc-md, r=brson
On MSVC there are two ways that the CRT can be linked, either statically or dynamically. Each object file produced by the compiler is compiled against msvcrt (a dll) or libcmt (a static library). When the linker is dealing with more than one object file, it requires that all object files link to the same CRT, or else the linker will spit out some errors. For now, compile code with `-MD` as it seems to appear more often in C libraries so we'll stick with the same trend.
2 parents 7b0f2af + cb7d914 commit 8a3f5af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mk/cfg/x86_64-pc-windows-msvc.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ CFG_STATIC_LIB_NAME_x86_64-pc-windows-msvc=$(1).lib
99
CFG_LIB_GLOB_x86_64-pc-windows-msvc=$(1)-*.dll
1010
CFG_LIB_DSYM_GLOB_x86_64-pc-windows-msvc=$(1)-*.dylib.dSYM
1111
CFG_JEMALLOC_CFLAGS_x86_64-pc-windows-msvc :=
12-
CFG_GCCISH_CFLAGS_x86_64-pc-windows-msvc :=
13-
CFG_GCCISH_CXXFLAGS_x86_64-pc-windows-msvc :=
12+
CFG_GCCISH_CFLAGS_x86_64-pc-windows-msvc := -MD
13+
CFG_GCCISH_CXXFLAGS_x86_64-pc-windows-msvc := -MD
1414
CFG_GCCISH_LINK_FLAGS_x86_64-pc-windows-msvc :=
1515
CFG_GCCISH_DEF_FLAG_x86_64-pc-windows-msvc :=
1616
CFG_LLC_FLAGS_x86_64-pc-windows-msvc :=

0 commit comments

Comments
 (0)