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
|
@ -645,9 +645,9 @@ impl RustcDefaultCalls {
|
|||
temps_dir: &Option<PathBuf>,
|
||||
) -> Compilation {
|
||||
use rustc_session::config::PrintRequest::*;
|
||||
// PrintRequest::NativeStaticLibs is special - printed during linking
|
||||
// NativeStaticLibs and LinkArgs are special - printed during linking
|
||||
// (empty iterator returns true)
|
||||
if sess.opts.prints.iter().all(|&p| p == PrintRequest::NativeStaticLibs) {
|
||||
if sess.opts.prints.iter().all(|&p| p == NativeStaticLibs || p == LinkArgs) {
|
||||
return Compilation::Continue;
|
||||
}
|
||||
|
||||
|
@ -738,7 +738,8 @@ impl RustcDefaultCalls {
|
|||
codegen_backend.print(*req, sess);
|
||||
}
|
||||
// Any output here interferes with Cargo's parsing of other printed output
|
||||
PrintRequest::NativeStaticLibs => {}
|
||||
NativeStaticLibs => {}
|
||||
LinkArgs => {}
|
||||
}
|
||||
}
|
||||
Compilation::Stop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue