diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2016-11-12 10:38:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-12 10:38:41 +0200 |
| commit | f80affac4471263e0b5c642b5c9b3cf57358683a (patch) | |
| tree | 397a508c499706d1f31110c7e58e910934e7c837 | |
| parent | 67ef819c0933aa9ff472414618d9655d41a4cd0d (diff) | |
| parent | 0d6323f44d3cd2a132a073e7a92893e777ca11fc (diff) | |
| download | rust-f80affac4471263e0b5c642b5c9b3cf57358683a.tar.gz rust-f80affac4471263e0b5c642b5c9b3cf57358683a.zip | |
Rollup merge of #37682 - cuviper:local-cargo, r=alexcrichton
rustbuild: enable an initial local cargo This allows the initial build of src/bootstrap itself to use a local cargo taken from `configure --local-rust-root`. It was already finding rustc this way, but was always downloading cargo since it didn't know where to find it. It now matches the same logic that `config.rs` will use for stage0, where both rustc and cargo are taken from `CFG_LOCAL_RUST_ROOT`.
| -rw-r--r-- | src/bootstrap/bootstrap.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 08a8ca5a631..a3fabbb3e80 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -226,13 +226,16 @@ class RustBuild(object): config = self.get_toml('cargo') if config: return config + config = self.get_mk('CFG_LOCAL_RUST_ROOT') + if config: + return config + '/bin/cargo' + self.exe_suffix() return os.path.join(self.bin_root(), "bin/cargo" + self.exe_suffix()) def rustc(self): config = self.get_toml('rustc') if config: return config - config = self.get_mk('CFG_LOCAL_RUST') + config = self.get_mk('CFG_LOCAL_RUST_ROOT') if config: return config + '/bin/rustc' + self.exe_suffix() return os.path.join(self.bin_root(), "bin/rustc" + self.exe_suffix()) |
