diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-10-01 12:18:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-01 12:18:11 +0200 |
| commit | cb4e2994c28ebe7a6a6685723573005b38855026 (patch) | |
| tree | 76d34ab83b08ac34d005085be25cae677059fa3b /src/bootstrap/bootstrap.py | |
| parent | 7c3eeb92a5f337be709f5d3f59522db8750a5f2f (diff) | |
| parent | 88e7718ec38bee9dfd16e9fc37896a637a33b1ae (diff) | |
| download | rust-cb4e2994c28ebe7a6a6685723573005b38855026.tar.gz rust-cb4e2994c28ebe7a6a6685723573005b38855026.zip | |
Rollup merge of #116292 - onur-ozkan:warn-wrong-sources, r=clubby789
warn if source is not either a git clone or a dist tarball When the repository is downloaded directly via HTTP(as in #115041), builds may fail due to missing submodules. This PR adds a check that warns people in such cases.
Diffstat (limited to 'src/bootstrap/bootstrap.py')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index fac0cdf2038..4af97b2f466 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -1042,6 +1042,12 @@ def bootstrap(args): """Configure, fetch, build and run the initial bootstrap""" rust_root = os.path.abspath(os.path.join(__file__, '../../..')) + if not os.path.exists(os.path.join(rust_root, '.git')) and \ + os.path.exists(os.path.join(rust_root, '.github')): + eprint("warn: Looks like you are trying to bootstrap Rust from a source that is neither a " + "git clone nor distributed tarball.\nThis build may fail due to missing submodules " + "unless you put them in place manually.") + # Read from `--config`, then `RUST_BOOTSTRAP_CONFIG`, then `./config.toml`, # then `config.toml` in the root directory. toml_path = args.config or os.getenv('RUST_BOOTSTRAP_CONFIG') |
