diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-02-10 22:59:40 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-02-14 01:52:03 +0200 |
| commit | d29f0bc8fa166117e62b1fa2969dd31f415fd887 (patch) | |
| tree | 29bf430d515a0cd59cc2c99c88bf355e7a7fee26 /src/bootstrap/bootstrap.py | |
| parent | 42c1ea2915d7787e4280b13b9d48bdb29f50e1d1 (diff) | |
| download | rust-d29f0bc8fa166117e62b1fa2969dd31f415fd887.tar.gz rust-d29f0bc8fa166117e62b1fa2969dd31f415fd887.zip | |
Automatically vendor Cargo deps when building the source tarballs.
Diffstat (limited to 'src/bootstrap/bootstrap.py')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 27255b69100..92a075ea9dc 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -294,6 +294,8 @@ class RustBuild(object): raise Exception("no cargo executable found at `%s`" % self.cargo()) args = [self.cargo(), "build", "--manifest-path", os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")] + if self.use_locked_deps: + args.append("--locked") if self.use_vendored_sources: args.append("--frozen") self.run(args, env) @@ -440,6 +442,9 @@ def main(): rb.use_vendored_sources = '\nvendor = true' in rb.config_toml or \ 'CFG_ENABLE_VENDOR' in rb.config_mk + rb.use_locked_deps = '\nlocked-deps = true' in rb.config_toml or \ + 'CFG_ENABLE_LOCKED_DEPS' in rb.config_mk + if 'SUDO_USER' in os.environ and not rb.use_vendored_sources: if os.environ.get('USER') != os.environ['SUDO_USER']: rb.use_vendored_sources = True |
