Skip to content

Commit

Permalink
mk: Compile C code on MSVC with /MD
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexcrichton committed Jun 3, 2015
1 parent c800b22 commit cb7d914
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mk/cfg/x86_64-pc-windows-msvc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ CFG_STATIC_LIB_NAME_x86_64-pc-windows-msvc=$(1).lib
CFG_LIB_GLOB_x86_64-pc-windows-msvc=$(1)-*.dll
CFG_LIB_DSYM_GLOB_x86_64-pc-windows-msvc=$(1)-*.dylib.dSYM
CFG_JEMALLOC_CFLAGS_x86_64-pc-windows-msvc :=
CFG_GCCISH_CFLAGS_x86_64-pc-windows-msvc :=
CFG_GCCISH_CXXFLAGS_x86_64-pc-windows-msvc :=
CFG_GCCISH_CFLAGS_x86_64-pc-windows-msvc := -MD
CFG_GCCISH_CXXFLAGS_x86_64-pc-windows-msvc := -MD
CFG_GCCISH_LINK_FLAGS_x86_64-pc-windows-msvc :=
CFG_GCCISH_DEF_FLAG_x86_64-pc-windows-msvc :=
CFG_LLC_FLAGS_x86_64-pc-windows-msvc :=
Expand Down

0 comments on commit cb7d914

Please sign in to comment.