Add rustc
option to output LLVM optimization remarks to YAML files
This commit is contained in:
parent
8882507bc7
commit
62728c7aaf
11 changed files with 180 additions and 13 deletions
|
@ -2583,6 +2583,10 @@ pub fn build_session_options(
|
|||
handler.early_warn("-C remark requires \"-C debuginfo=n\" to show source locations");
|
||||
}
|
||||
|
||||
if cg.remark.is_empty() && unstable_opts.remark_dir.is_some() {
|
||||
handler.early_warn("using -Z remark-dir without enabling remarks using e.g. -C remark=all");
|
||||
}
|
||||
|
||||
let externs = parse_externs(handler, matches, &unstable_opts);
|
||||
|
||||
let crate_name = matches.opt_str("crate-name");
|
||||
|
|
|
@ -1314,7 +1314,7 @@ options! {
|
|||
"control generation of position-independent code (PIC) \
|
||||
(`rustc --print relocation-models` for details)"),
|
||||
remark: Passes = (Passes::Some(Vec::new()), parse_passes, [UNTRACKED],
|
||||
"print remarks for these optimization passes (space separated, or \"all\")"),
|
||||
"output remarks for these optimization passes (space separated, or \"all\")"),
|
||||
rpath: bool = (false, parse_bool, [UNTRACKED],
|
||||
"set rpath values in libs/exes (default: no)"),
|
||||
save_temps: bool = (false, parse_bool, [UNTRACKED],
|
||||
|
@ -1659,6 +1659,9 @@ options! {
|
|||
"choose which RELRO level to use"),
|
||||
remap_cwd_prefix: Option<PathBuf> = (None, parse_opt_pathbuf, [TRACKED],
|
||||
"remap paths under the current working directory to this path prefix"),
|
||||
remark_dir: Option<PathBuf> = (None, parse_opt_pathbuf, [UNTRACKED],
|
||||
"directory into which to write optimization remarks (if not specified, they will be \
|
||||
written to standard error output)"),
|
||||
report_delayed_bugs: bool = (false, parse_bool, [TRACKED],
|
||||
"immediately print bugs registered with `delay_span_bug` (default: no)"),
|
||||
sanitizer: SanitizerSet = (SanitizerSet::empty(), parse_sanitizers, [TRACKED],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue