X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fbootstrap%2Fflags.rs;h=ee341a353ac470867699aab12fdb29a06066ec64;hb=ccde95f4895ea301073ca723cadc0675617b9c8f;hp=802b49d748ac6f64fccc89bfcd9790939e6d27cf;hpb=c2d2535b8427845634d503cc8f75595d296f1268;p=rust.git diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index 802b49d748a..ee341a353ac 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -78,6 +78,8 @@ pub struct Flags { // // llvm_out/build/profiles/ is the location this writes to. pub llvm_profile_generate: bool, + pub llvm_bolt_profile_generate: bool, + pub llvm_bolt_profile_use: Option, } #[derive(Debug)] @@ -255,6 +257,8 @@ pub fn parse(args: &[String]) -> Flags { opts.optmulti("D", "", "deny certain clippy lints", "OPT"); opts.optmulti("W", "", "warn about certain clippy lints", "OPT"); opts.optmulti("F", "", "forbid certain clippy lints", "OPT"); + opts.optflag("", "llvm-bolt-profile-generate", "generate BOLT profile for LLVM build"); + opts.optopt("", "llvm-bolt-profile-use", "use BOLT profile for LLVM build", "PROFILE"); // We can't use getopt to parse the options until we have completed specifying which // options are valid, but under the current implementation, some options are conditional on @@ -691,6 +695,8 @@ pub fn parse(args: &[String]) -> Flags { rust_profile_generate: matches.opt_str("rust-profile-generate"), llvm_profile_use: matches.opt_str("llvm-profile-use"), llvm_profile_generate: matches.opt_present("llvm-profile-generate"), + llvm_bolt_profile_generate: matches.opt_present("llvm-bolt-profile-generate"), + llvm_bolt_profile_use: matches.opt_str("llvm-bolt-profile-use"), } } }