about summary refs log tree commit diff
path: root/src/librustc_session
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-06-19 08:56:04 +0200
committerGitHub <noreply@github.com>2020-06-19 08:56:04 +0200
commitea3c309700020cf78632dc00d949048bf3f75b5f (patch)
tree84243ace4f458c35867bddeb6539d5ae68392a93 /src/librustc_session
parent5e7eec2eaa8b25d8a607a9ced3ef4df01aab3787 (diff)
parent43905cd7501fd37090cb9de6069faaba761e514a (diff)
Rollup merge of #72999 - mati865:separate-self-contained-dir, r=Mark-Simulacrum
Create self-contained directory and move there some of external binaries/libs

One of the steps to reach design described in https://github.com/rust-lang/rust/issues/68887#issuecomment-633048380
This PR moves things around and allows link code to handle the new directory structure.
Diffstat (limited to 'src/librustc_session')
-rw-r--r--src/librustc_session/filesearch.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc_session/filesearch.rs b/src/librustc_session/filesearch.rs
index e98746231fb..5586b82b0ed 100644
--- a/src/librustc_session/filesearch.rs
+++ b/src/librustc_session/filesearch.rs
@@ -41,6 +41,10 @@ impl<'a> FileSearch<'a> {
         make_target_lib_path(self.sysroot, self.triple)
     }
 
+    pub fn get_selfcontained_lib_path(&self) -> PathBuf {
+        self.get_lib_path().join("self-contained")
+    }
+
     pub fn search<F>(&self, mut pick: F)
     where
         F: FnMut(&SearchPathFile, PathKind) -> FileMatch,
@@ -94,7 +98,7 @@ impl<'a> FileSearch<'a> {
         p.push(RUST_LIB_DIR);
         p.push(&self.triple);
         p.push("bin");
-        vec![p]
+        vec![p.clone(), p.join("self-contained")]
     }
 }