Add logic to override profile for non git sources
This commit is contained in:
parent
39dc268459
commit
7d806171d0
2 changed files with 7 additions and 4 deletions
|
@ -1268,6 +1268,11 @@ def bootstrap(args):
|
|||
config_toml = ""
|
||||
|
||||
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
|
||||
|
|
|
@ -2926,10 +2926,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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue