summaryrefslogtreecommitdiff
path: root/user/rust/0012-Link-stage-2-tools-dynamically-to-libstd.patch
blob: 8d37b335ceefabbf95ad973a46119fbeda2d90b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 51b5ec642911295036d4ff19d4d6799037da3efc Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 24 Sep 2018 23:42:23 +0000
Subject: [PATCH 12/14] 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 9f6db73e6f..69cc2219c1 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -208,7 +208,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.21.0