summaryrefslogblamecommitdiff
path: root/user/rust/0028-Link-stage-2-tools-dynamically-to-libstd.patch
blob: 5a6f8506c2a70abb148190e3483ca893be9bb246 (plain) (tree)


























                                                                               
From 418b6417dbaf06f5afe7a076bc8d58c308a4a48c Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 24 Sep 2018 23:42:23 +0000
Subject: [PATCH 28/28] Link stage 2 tools dynamically to libstd

---
 src/bootstrap/tool.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index 5e68b797b3..6a4c53f9a1 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -261,7 +261,9 @@ pub fn prepare_tool_cargo(
 
     // We don't want to build tools dynamically as they'll be running across
     // stages and such and it's just easier if they're not dynamically linked.
-    cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
+    if compiler.stage < 2 {
+        cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
+    }
 
     if source_type == SourceType::Submodule {
         cargo.env("RUSTC_EXTERNAL_TOOL", "1");
-- 
2.18.0