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

Commit 900ed0b

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

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/bootstrap/bootstrap.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,12 @@ def bootstrap(args):
11451145
else:
11461146
config_toml = ''
11471147

1148-
profile = RustBuild.get_toml_static(config_toml, 'profile')
1148+
profile = RustBuild.get_toml_static(config_toml, "profile")
1149+
is_non_git_source = not os.path.exists(os.path.join(rust_root, ".git"))
1150+
1151+
if profile is None and is_non_git_source:
1152+
profile = "dist"
1153+
11491154
if profile is not None:
11501155
# Allows creating alias for profile names, allowing
11511156
# 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
@@ -2858,10 +2858,8 @@ impl Config {
28582858
let if_unchanged = || {
28592859
if self.rust_info.is_from_tarball() {
28602860
// Git is needed for running "if-unchanged" logic.
2861-
println!(
2862-
"WARNING: 'if-unchanged' has no effect on tarball sources; ignoring `download-ci-llvm`."
2863-
);
2864-
return false;
2861+
println!("ERROR: 'if-unchanged' is only compatible with Git managed sources.");
2862+
crate::exit!(1);
28652863
}
28662864

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

0 commit comments

Comments
 (0)