@@ -79,6 +79,9 @@ pub struct Flags {
7979 //
8080 // llvm_out/build/profiles/ is the location this writes to.
8181 pub llvm_profile_generate : bool ,
82+
83+ pub libstd_profile_use : Option < String > ,
84+ pub libstd_profile_generate : Option < String > ,
8285}
8386
8487#[ cfg_attr( test, derive( Clone ) ) ]
@@ -247,6 +250,13 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
247250 opts. optopt ( "" , "rust-profile-use" , "use PGO profile for rustc build" , "PROFILE" ) ;
248251 opts. optflag ( "" , "llvm-profile-generate" , "generate PGO profile with llvm built for rustc" ) ;
249252 opts. optopt ( "" , "llvm-profile-use" , "use PGO profile for llvm build" , "PROFILE" ) ;
253+ opts. optopt (
254+ "" ,
255+ "libstd-profile-generate" ,
256+ "generate PGO profile with libstd build" ,
257+ "PROFILE" ,
258+ ) ;
259+ opts. optopt ( "" , "libstd-profile-use" , "use PGO profile for libstd build" , "PROFILE" ) ;
250260
251261 // We can't use getopt to parse the options until we have completed specifying which
252262 // options are valid, but under the current implementation, some options are conditional on
@@ -676,6 +686,8 @@ Arguments:
676686 rust_profile_generate : matches. opt_str ( "rust-profile-generate" ) ,
677687 llvm_profile_use : matches. opt_str ( "llvm-profile-use" ) ,
678688 llvm_profile_generate : matches. opt_present ( "llvm-profile-generate" ) ,
689+ libstd_profile_use : matches. opt_str ( "libstd-profile-use" ) ,
690+ libstd_profile_generate : matches. opt_str ( "libstd-profile-generate" ) ,
679691 }
680692 }
681693}
0 commit comments