@@ -700,7 +700,7 @@ trait Merge {
700700impl Merge for TomlConfig {
701701 fn merge (
702702 & 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 ,
704704 replace : ReplaceOpt ,
705705 ) {
706706 fn do_merge < T : Merge > ( x : & mut Option < T > , y : Option < T > , replace : ReplaceOpt ) {
@@ -712,7 +712,10 @@ impl Merge for TomlConfig {
712712 }
713713 }
714714 }
715+
715716 self . change_id . inner . merge ( change_id. inner , replace) ;
717+ self . profile . merge ( profile, replace) ;
718+
716719 do_merge ( & mut self . build , build, replace) ;
717720 do_merge ( & mut self . install , install, replace) ;
718721 do_merge ( & mut self . llvm , llvm, replace) ;
@@ -1505,6 +1508,10 @@ impl Config {
15051508 build. cargo = build. cargo . take ( ) . or ( std:: env:: var_os ( "CARGO" ) . map ( |p| p. into ( ) ) ) ;
15061509 }
15071510
1511+ if GitInfo :: new ( false , & config. src ) . is_from_tarball ( ) && toml. profile . is_none ( ) {
1512+ toml. profile = Some ( "dist" . into ( ) ) ;
1513+ }
1514+
15081515 if let Some ( include) = & toml. profile {
15091516 // Allows creating alias for profile names, allowing
15101517 // profiles to be renamed while maintaining back compatibility
0 commit comments