@@ -700,7 +700,7 @@ trait Merge {
700
700
impl Merge for TomlConfig {
701
701
fn merge (
702
702
& mut self ,
703
- TomlConfig { build, install, llvm, rust, dist, target, profile : _ , change_id } : Self ,
703
+ TomlConfig { build, install, llvm, rust, dist, target, profile, change_id } : Self ,
704
704
replace : ReplaceOpt ,
705
705
) {
706
706
fn do_merge < T : Merge > ( x : & mut Option < T > , y : Option < T > , replace : ReplaceOpt ) {
@@ -712,7 +712,10 @@ impl Merge for TomlConfig {
712
712
}
713
713
}
714
714
}
715
+
715
716
self . change_id . inner . merge ( change_id. inner , replace) ;
717
+ self . profile . merge ( profile, replace) ;
718
+
716
719
do_merge ( & mut self . build , build, replace) ;
717
720
do_merge ( & mut self . install , install, replace) ;
718
721
do_merge ( & mut self . llvm , llvm, replace) ;
@@ -1505,6 +1508,10 @@ impl Config {
1505
1508
build. cargo = build. cargo . take ( ) . or ( std:: env:: var_os ( "CARGO" ) . map ( |p| p. into ( ) ) ) ;
1506
1509
}
1507
1510
1511
+ if GitInfo :: new ( false , & config. src ) . is_from_tarball ( ) && toml. profile . is_none ( ) {
1512
+ toml. profile = Some ( "dist" . into ( ) ) ;
1513
+ }
1514
+
1508
1515
if let Some ( include) = & toml. profile {
1509
1516
// Allows creating alias for profile names, allowing
1510
1517
// profiles to be renamed while maintaining back compatibility
0 commit comments