summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMateusz Mikuła <mati865@gmail.com>2019-10-28 21:43:37 +0100
committerMateusz Mikuła <mati865@gmail.com>2019-10-30 23:18:57 +0100
commitb20d8d3396faadd76f413d1d073be5c7576e5780 (patch)
treeaf39dfc80cb5dfe59a083daac3d96221fcf1c1d5 /src/bootstrap
parentc553e8e8812c19809e70523064989e66c5cfd3f1 (diff)
downloadrust-b20d8d3396faadd76f413d1d073be5c7576e5780.tar.gz
rust-b20d8d3396faadd76f413d1d073be5c7576e5780.zip
Statically link libstdc++ on windows-gnu
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/compile.rs4
-rw-r--r--src/bootstrap/dist.rs2
-rw-r--r--src/bootstrap/native.rs4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index da8d43ed49b..8e5fe2520ca 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -657,11 +657,11 @@ pub fn build_codegen_backend(builder: &Builder<'_>,
             if let Some(ref s) = builder.config.llvm_ldflags {
                 cargo.env("LLVM_LINKER_FLAGS", s);
             }
-            // Building with a static libstdc++ is only supported on linux right now,
+            // Building with a static libstdc++ is only supported on linux and mingw right now,
             // not for MSVC or macOS
             if builder.config.llvm_static_stdcpp &&
                !target.contains("freebsd") &&
-               !target.contains("windows") &&
+               !target.contains("msvc") &&
                !target.contains("apple") {
                 let file = compiler_file(builder,
                                          builder.cxx(target).unwrap(),
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 93143570b0f..67907bc8cbf 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -236,7 +236,7 @@ fn make_win_dist(
     }
 
     let target_tools = ["gcc.exe", "ld.exe", "dlltool.exe", "libwinpthread-1.dll"];
-    let mut rustc_dlls = vec!["libstdc++-6.dll", "libwinpthread-1.dll"];
+    let mut rustc_dlls = vec!["libwinpthread-1.dll"];
     if target_triple.starts_with("i686-") {
         rustc_dlls.push("libgcc_s_dw2-1.dll");
     } else {
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index e76604e45bd..2e89fd5398d 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -159,7 +159,7 @@ impl Step for Llvm {
 
         // For distribution we want the LLVM tools to be *statically* linked to libstdc++
         if builder.config.llvm_tools_enabled || builder.config.lldb_enabled {
-            if !target.contains("windows") {
+            if !target.contains("msvc") {
                 if target.contains("apple") {
                     cfg.define("CMAKE_EXE_LINKER_FLAGS", "-static-libstdc++");
                 } else {
@@ -395,7 +395,7 @@ fn configure_cmake(builder: &Builder<'_>,
     cfg.define("CMAKE_C_FLAGS", cflags);
     let mut cxxflags = builder.cflags(target, GitRepo::Llvm).join(" ");
     if builder.config.llvm_static_stdcpp &&
-        !target.contains("windows") &&
+        !target.contains("msvc") &&
         !target.contains("netbsd")
     {
         cxxflags.push_str(" -static-libstdc++");