Skip to content

Commit

Permalink
Auto merge of #111626 - pjhades:output, r=b-naber
Browse files Browse the repository at this point in the history
Write to stdout if `-` is given as output file

With this PR, if `-o -` or `--emit KIND=-` is provided, output will be written to stdout instead. Binary output (those of type `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 implements rust-lang/compiler-team#431

The idea behind the changes is to introduce an `OutFileName` enum that represents the output - be it a real path or stdout - and to use this enum along the code paths that handle different output types.
  • Loading branch information
bors committed Jun 9, 2023
2 parents 4723ad6 + 293d2e1 commit 69aa928
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 69aa928

Please sign in to comment.