diff options
| author | Matthew Dawson <matthew@mjdsystems.ca> | 2017-07-07 23:00:38 -0400 |
|---|---|---|
| committer | Matthew Dawson <matthew@mjdsystems.ca> | 2017-07-07 23:07:01 -0400 |
| commit | ce3abc5801f94292be9bc5fbe00b52f1ccb28672 (patch) | |
| tree | c1c09989bd4826dc715566c2b84a89e104cdecd5 /src/bootstrap/lib.rs | |
| parent | 9b85e1cfa5aa2aaa4b5df4359a023ad793983ffc (diff) | |
| download | rust-ce3abc5801f94292be9bc5fbe00b52f1ccb28672.tar.gz rust-ce3abc5801f94292be9bc5fbe00b52f1ccb28672.zip | |
Fix stage 2 builds with a custom libdir.
When copying libstd for the stage 2 compiler, the builder ignores the configured libdir/libdir_relative configuration parameters. This causes the compiler to fail to find libstd, which cause any tools built with the stage 2 compiler to fail. To fix this, make the copy steps of rustbuild aware of the libdir_relative parameter when the stage >= 2. Also update the dist target to be aware of the new location of libstd.
Diffstat (limited to 'src/bootstrap/lib.rs')
| -rw-r--r-- | src/bootstrap/lib.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 5a3785b1ed6..032231582ef 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -645,8 +645,14 @@ impl Build { /// Returns the libdir where the standard library and other artifacts are /// found for a compiler's sysroot. fn sysroot_libdir(&self, compiler: &Compiler, target: &str) -> PathBuf { - self.sysroot(compiler).join("lib").join("rustlib") - .join(target).join("lib") + if compiler.stage >= 2 { + if let Some(ref libdir_relative) = self.config.libdir_relative { + return self.sysroot(compiler).join(libdir_relative) + .join("rustlib").join(target).join("lib") + } + } + self.sysroot(compiler).join("lib").join("rustlib") + .join(target).join("lib") } /// Returns the root directory for all output generated in a particular |
