diff options
| author | Tanvi Pooranmal Meena <tanvimeena19@gmail.com> | 2025-01-13 15:38:39 +0530 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2025-01-23 11:48:12 -0800 |
| commit | 900ed0b1a1088a757016e4f7f5ad7bbdaef741a1 (patch) | |
| tree | ffba3f2e01cb442ae3dad721cb17ac44b26fce19 | |
| parent | 07c33e9b98186fcee55b45706a05dfcc639273ca (diff) | |
| download | rust-900ed0b1a1088a757016e4f7f5ad7bbdaef741a1.tar.gz rust-900ed0b1a1088a757016e4f7f5ad7bbdaef741a1.zip | |
Add logic to override profile for non git sources
(cherry picked from commit 7d806171d00f53a720e6784a878a98cbef5c3d4a)
| -rw-r--r-- | src/bootstrap/bootstrap.py | 7 | ||||
| -rw-r--r-- | src/bootstrap/src/core/config/config.rs | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index d7ae0299dd6..baad163ca07 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -1145,7 +1145,12 @@ def bootstrap(args): else: config_toml = '' - profile = RustBuild.get_toml_static(config_toml, 'profile') + profile = RustBuild.get_toml_static(config_toml, "profile") + is_non_git_source = not os.path.exists(os.path.join(rust_root, ".git")) + + if profile is None and is_non_git_source: + profile = "dist" + if profile is not None: # Allows creating alias for profile names, allowing # profiles to be renamed while maintaining back compatibility diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index e706aba977b..94689595d65 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -2858,10 +2858,8 @@ impl Config { let if_unchanged = || { if self.rust_info.is_from_tarball() { // Git is needed for running "if-unchanged" logic. - println!( - "WARNING: 'if-unchanged' has no effect on tarball sources; ignoring `download-ci-llvm`." - ); - return false; + println!("ERROR: 'if-unchanged' is only compatible with Git managed sources."); + crate::exit!(1); } // Fetching the LLVM submodule is unnecessary for self-tests. |
