1
Fork 0

Write to stdout if - is given as output file

If `-o -` or `--emit KIND=-` is provided, output will be written
to stdout instead. Binary output (`obj`, `llvm-bc`, `link` and
`metadata`) being written this way will result in an error unless
stdout is not a tty. Multiple output types going to stdout will
trigger an error too, as they will all be mixded together.
This commit is contained in:
Jing Peng 2023-02-26 15:27:27 -05:00
parent 1221e43bdf
commit 9b1a1e1d95
32 changed files with 456 additions and 101 deletions

View file

@ -82,6 +82,12 @@ impl IntoDiagnosticArg for DebugArgPath<'_> {
}
}
#[derive(Diagnostic)]
#[diag(codegen_ssa_binary_output_to_tty)]
pub struct BinaryOutputToTty {
pub shorthand: &'static str,
}
#[derive(Diagnostic)]
#[diag(codegen_ssa_ignoring_emit_path)]
pub struct IgnoringEmitPath {