Rollup merge of #91606 - joshtriplett:stabilize-print-link-args, r=pnkfelix
Stabilize `-Z print-link-args` as `--print link-args` We have stable options for adding linker arguments; we should have a stable option to help debug linker arguments. Add documentation for the new option. In the documentation, make it clear that the *exact* format of the output is not a stable guarantee.
This commit is contained in:
commit
02379e917b
13 changed files with 24 additions and 17 deletions
|
@ -565,6 +565,7 @@ pub enum PrintRequest {
|
|||
TargetSpec,
|
||||
NativeStaticLibs,
|
||||
StackProtectorStrategies,
|
||||
LinkArgs,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
|
@ -1187,7 +1188,8 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
|
|||
"Compiler information to print on stdout",
|
||||
"[crate-name|file-names|sysroot|target-libdir|cfg|target-list|\
|
||||
target-cpus|target-features|relocation-models|code-models|\
|
||||
tls-models|target-spec-json|native-static-libs|stack-protector-strategies]",
|
||||
tls-models|target-spec-json|native-static-libs|stack-protector-strategies\
|
||||
link-args]",
|
||||
),
|
||||
opt::flagmulti_s("g", "", "Equivalent to -C debuginfo=2"),
|
||||
opt::flagmulti_s("O", "", "Equivalent to -C opt-level=2"),
|
||||
|
@ -1619,6 +1621,7 @@ fn collect_print_requests(
|
|||
);
|
||||
}
|
||||
}
|
||||
"link-args" => PrintRequest::LinkArgs,
|
||||
req => early_error(error_format, &format!("unknown print request `{}`", req)),
|
||||
}));
|
||||
|
||||
|
|
|
@ -1339,8 +1339,6 @@ options! {
|
|||
See #77382 and #74551."),
|
||||
print_fuel: Option<String> = (None, parse_opt_string, [TRACKED],
|
||||
"make rustc print the total optimization fuel used by a crate"),
|
||||
print_link_args: bool = (false, parse_bool, [UNTRACKED],
|
||||
"print the arguments passed to the linker (default: no)"),
|
||||
print_llvm_passes: bool = (false, parse_bool, [UNTRACKED],
|
||||
"print the LLVM optimization passes being run (default: no)"),
|
||||
print_mono_items: Option<String> = (None, parse_opt_string, [UNTRACKED],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue