diff options
| author | Josh Stone <cuviper@gmail.com> | 2016-11-09 22:18:02 -0800 |
|---|---|---|
| committer | Josh Stone <cuviper@gmail.com> | 2016-11-09 22:25:17 -0800 |
| commit | 0d6323f44d3cd2a132a073e7a92893e777ca11fc (patch) | |
| tree | ae1e0b825ef1abe0df82da76a769d9a527940d27 /src/bootstrap | |
| parent | b46ce08df51f95e5d9f6dff9156b1d8e38cf4795 (diff) | |
| download | rust-0d6323f44d3cd2a132a073e7a92893e777ca11fc.tar.gz rust-0d6323f44d3cd2a132a073e7a92893e777ca11fc.zip | |
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`.
Diffstat (limited to 'src/bootstrap')
| -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()) |
