aboutsummaryrefslogtreecommitdiffstats
path: root/community/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2019-11-23 14:32:01 +0100
committerRasmus Thomsen <oss@cogitri.dev>2019-11-24 00:18:10 +0100
commit04ce325809f0ccdb7207868f42253c55a47b921c (patch)
tree09bc66658e1d9bb67c37992a06019b37cac5f2b6 /community/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch
parent5186561bb8442f65021d73102981dc822a11c4e9 (diff)
downloadaports-04ce325809f0ccdb7207868f42253c55a47b921c.tar.bz2
aports-04ce325809f0ccdb7207868f42253c55a47b921c.tar.xz
community/rust: upgrade to 1.39.0
Diffstat (limited to 'community/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch')
-rw-r--r--community/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/community/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch b/community/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch
new file mode 100644
index 0000000000..632717f56b
--- /dev/null
+++ b/community/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch
@@ -0,0 +1,20 @@
+Replaces an older patch by Samuel Holland. The RUSTC_NO_PREFER_DYNAMIC
+env var was removed and replaced with the following logic in builder.rs.
+
+The idea for this patch is to link stage2 tools dynamically as these will
+be distributed (if built). Intermediate tools from previous stages will
+be statically linked for convenience.
+
+@q66
+
+--- a/src/bootstrap/builder.rs
++++ b/src/bootstrap/builder.rs
+@@ -1228,6 +1228,8 @@ impl<'a> Builder<'a> {
+ // linking all deps statically into the dylib.
+ if let Mode::Std | Mode::Rustc | Mode::Codegen = mode {
+ rustflags.arg("-Cprefer-dynamic");
++ } else if stage >= 2 {
++ rustflags.arg("-Cprefer-dynamic");
+ }
+
+ Cargo {