Skip to content

Commit 32a8269

Browse files
committed
link vcruntime statically
1 parent f2e59cc commit 32a8269

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,6 +1730,7 @@ do
17301730
fi
17311731
# FIXME: What about LDFLAGS?
17321732
fi
1733+
CMAKE_ARGS="$CMAKE_ARGS '-DCMAKE_C_FLAGS=-D_VCRTIMP=' '-DCMAKE_CXX_FLAGS=-D_VCRTIMP='"
17331734

17341735
if [ -n "$CFG_DISABLE_OPTIMIZE_LLVM" ]; then
17351736
CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE=Debug"

src/librustc_trans/back/linker.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ impl<'a, 'tcx> LinkerInfo {
4545
cmd: &'a mut Command,
4646
sess: &'a Session) -> Box<Linker+'a> {
4747
if sess.target.target.options.is_like_msvc {
48+
cmd.arg("/NODEFAULTLIB:vcruntime.lib");
49+
cmd.arg("libvcruntime.lib");
4850
Box::new(MsvcLinker {
4951
cmd: cmd,
5052
sess: sess,

0 commit comments

Comments
 (0)