"`-C save-temps` might not produce all requested temporary products \
when incremental compilation is enabled.")],
"save all temporary output files during compilation"),
- pgo_gen: Option<String> = (None, parse_opt_string, [TRACKED],
- "Generate PGO profile data, to a given file, or to the default \
- location if it's empty."),
- pgo_use: String = (String::new(), parse_string, [TRACKED],
- "Use PGO profile data from the given profile file."),
rpath: bool = (false, parse_bool, [UNTRACKED],
"set rpath values in libs/exes"),
overflow_checks: Option<bool> = (None, parse_opt_bool, [TRACKED],
"extra arguments to prepend to the linker invocation (space separated)"),
profile: bool = (false, parse_bool, [TRACKED],
"insert profiling code"),
+ pgo_gen: Option<String> = (None, parse_opt_string, [TRACKED],
+ "Generate PGO profile data, to a given file, or to the default \
+ location if it's empty."),
+ pgo_use: String = (String::new(), parse_string, [TRACKED],
+ "Use PGO profile data from the given profile file."),
relro_level: Option<RelroLevel> = (None, parse_relro_level, [TRACKED],
"choose which RELRO level to use"),
nll: bool = (false, parse_bool, [UNTRACKED],
);
}
+ if debugging_opts.pgo_gen.is_some() && !debugging_opts.pgo_use.is_empty() {
+ early_error(
+ error_format,
+ "options `-Z pgo-gen` and `-Z pgo-use` are exclusive",
+ );
+ }
+
let mut output_types = BTreeMap::new();
if !debugging_opts.parse_only {
for list in matches.opt_strs("emit") {
let mut codegen_units = cg.codegen_units;
let mut disable_thinlto = false;
- if cg.pgo_gen.is_some() && !cg.pgo_use.is_empty() {
- early_error(
- error_format,
- "options `-C pgo-gen` and `-C pgo-use` are exclussive",
- );
- }
-
// Issue #30063: if user requests llvm-related output to one
// particular path, disable codegen-units.
let incompatible: Vec<_> = output_types
opts.cg.lto = Lto::Fat;
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
- opts = reference.clone();
- opts.cg.pgo_gen = Some(String::from("abc"));
- assert_ne!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
-
- opts = reference.clone();
- opts.cg.pgo_use = String::from("abc");
- assert_ne!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
-
opts = reference.clone();
opts.cg.target_cpu = Some(String::from("abc"));
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts.debugging_opts.tls_model = Some(String::from("tls model"));
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
+ opts = reference.clone();
+ opts.debugging_opts.pgo_gen = Some(String::from("abc"));
+ assert_ne!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
+
+ opts = reference.clone();
+ opts.debugging_opts.pgo_use = String::from("abc");
+ assert_ne!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
+
opts = reference.clone();
opts.cg.metadata = vec![String::from("A"), String::from("B")];
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());