summaryrefslogtreecommitdiff
path: root/user/rust/0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch
blob: 087dea2954430ded5d1f1d8520956577a8d734f2 (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
28
29
30
31
32
33
34
35
36
From c4565fab697249c4233c97f7855fe692a5a880a4 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 2 Dec 2017 17:25:44 -0600
Subject: [PATCH 03/14] Allow rustdoc to work when cross-compiling on musl

musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
---
 src/bootstrap/bin/rustdoc.rs | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index 52b5971f0a..c779e35e26 100644
--- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs
@@ -23,9 +23,6 @@ fn main() {
         Err(_) => 0,
     };
 
-    let mut dylib_path = bootstrap::util::dylib_path();
-    dylib_path.insert(0, PathBuf::from(libdir.clone()));
-
     //FIXME(misdreavus): once stdsimd uses cfg(rustdoc) instead of cfg(dox), remove the `--cfg dox`
     //arguments here
     let mut cmd = Command::new(rustdoc);
@@ -37,7 +34,7 @@ fn main() {
         .arg("--sysroot")
         .arg(sysroot)
         .env(bootstrap::util::dylib_path_var(),
-             env::join_paths(&dylib_path).unwrap());
+             PathBuf::from(libdir.clone()));
 
     // Force all crates compiled by this compiler to (a) be unstable and (b)
     // allow the `rustc_private` feature to link to other unstable crates
-- 
2.21.0