Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit eb03c32

Browse files
tanvinciblecuviper
authored andcommitted
Add logic to override profile for non git sources
(cherry picked from commit 7d80617)
1 parent a41d236 commit eb03c32

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/bootstrap/bootstrap.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,11 @@ def bootstrap(args):
12641264
config_toml = ""
12651265

12661266
profile = RustBuild.get_toml_static(config_toml, "profile")
1267+
is_non_git_source = not os.path.exists(os.path.join(rust_root, ".git"))
1268+
1269+
if profile is None and is_non_git_source:
1270+
profile = "dist"
1271+
12671272
if profile is not None:
12681273
# Allows creating alias for profile names, allowing
12691274
# profiles to be renamed while maintaining back compatibility

src/bootstrap/src/core/config/config.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2914,10 +2914,8 @@ impl Config {
29142914
let if_unchanged = || {
29152915
if self.rust_info.is_from_tarball() {
29162916
// Git is needed for running "if-unchanged" logic.
2917-
println!(
2918-
"WARNING: 'if-unchanged' has no effect on tarball sources; ignoring `download-ci-llvm`."
2919-
);
2920-
return false;
2917+
println!("ERROR: 'if-unchanged' is only compatible with Git managed sources.");
2918+
crate::exit!(1);
29212919
}
29222920

29232921
// Fetching the LLVM submodule is unnecessary for self-tests.

0 commit comments

Comments
 (0)