File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2661,7 +2661,7 @@ pub enum ArtifactKeepMode {
26612661
26622662pub fn run_cargo (
26632663 builder : & Builder < ' _ > ,
2664- cargo : Cargo ,
2664+ mut cargo : Cargo ,
26652665 tail_args : Vec < String > ,
26662666 stamp : & BuildStamp ,
26672667 additional_target_deps : Vec < ( PathBuf , DependencyType ) > ,
@@ -2679,6 +2679,16 @@ pub fn run_cargo(
26792679 . unwrap ( ) // chop off `$target`
26802680 . join ( target_root_dir. file_name ( ) . unwrap ( ) ) ;
26812681
2682+ match artifact_keep_mode {
2683+ ArtifactKeepMode :: OnlyDylib
2684+ | ArtifactKeepMode :: OnlyRmeta
2685+ | ArtifactKeepMode :: BothRlibAndRmeta
2686+ | ArtifactKeepMode :: Custom ( _) => {
2687+ cargo. arg ( "-Zno-embed-metadata" ) ;
2688+ }
2689+ ArtifactKeepMode :: OnlyRlib => { }
2690+ }
2691+
26822692 // Spawn Cargo slurping up its JSON output. We'll start building up the
26832693 // `deps` array of all files it generated along with a `toplevel` array of
26842694 // files we need to probe for later.
Original file line number Diff line number Diff line change @@ -1095,10 +1095,6 @@ impl Builder<'_> {
10951095 // Enable usage of unstable features
10961096 cargo. env ( "RUSTC_BOOTSTRAP" , "1" ) ;
10971097
1098- if matches ! ( mode, Mode :: Std | Mode :: Rustc | Mode :: Codegen ) {
1099- cargo. arg ( "-Zno-embed-metadata" ) ;
1100- }
1101-
11021098 if self . config . dump_bootstrap_shims {
11031099 prepare_behaviour_dump_dir ( self . build ) ;
11041100
You can’t perform that action at this time.
0 commit comments