Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7d80617

Browse files
committedJan 20, 2025
Add logic to override profile for non git sources
1 parent 39dc268 commit 7d80617

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed
 

‎src/bootstrap/bootstrap.py

+5
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,11 @@ def bootstrap(args):
12681268
config_toml = ""
12691269

12701270
profile = RustBuild.get_toml_static(config_toml, "profile")
1271+
is_non_git_source = not os.path.exists(os.path.join(rust_root, ".git"))
1272+
1273+
if profile is None and is_non_git_source:
1274+
profile = "dist"
1275+
12711276
if profile is not None:
12721277
# Allows creating alias for profile names, allowing
12731278
# profiles to be renamed while maintaining back compatibility

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -2926,10 +2926,8 @@ impl Config {
29262926
let if_unchanged = || {
29272927
if self.rust_info.is_from_tarball() {
29282928
// Git is needed for running "if-unchanged" logic.
2929-
println!(
2930-
"WARNING: 'if-unchanged' has no effect on tarball sources; ignoring `download-ci-llvm`."
2931-
);
2932-
return false;
2929+
println!("ERROR: 'if-unchanged' is only compatible with Git managed sources.");
2930+
crate::exit!(1);
29332931
}
29342932

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

0 commit comments

Comments
 (0)
Failed to load comments.