Skip to content

Respect -o output file in --print#110785

Closed
dtolnay wants to merge 8 commits intorust-lang:masterfrom
dtolnay:printoutfile
Closed

Respect -o output file in --print#110785
dtolnay wants to merge 8 commits intorust-lang:masterfrom
dtolnay:printoutfile

Conversation

@dtolnay
Copy link
Member

@dtolnay dtolnay commented Apr 25, 2023

Previously something like rustc --print=cfg -o cfg.txt just ignored the -o option and would print to stdout as usual.

File output simplifies integration in non-Cargo build systems — in my case Buck2. With this PR we get to skip a layer of Python wrapper or Bash wrapper to redirect rustc's stdout into the location dictated by the build system.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes Marks issues that should be documented in the release notes of the next release. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.