]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #83846 - torhovland:issue-10971, r=davidtwco
authorbors <bors@rust-lang.org>
Thu, 11 Nov 2021 02:52:32 +0000 (02:52 +0000)
committerbors <bors@rust-lang.org>
Thu, 11 Nov 2021 02:52:32 +0000 (02:52 +0000)
commit9dbbbb12c0b796f35cbf5a518ac12846c969a214
tree7c95c3e7250903ac35f7beb00ab83aca33ad38e3
parent8e0293137f895a417fa043b9817c455150769406
parent1793a7acc74f5581febf5822923f8f38c63e8f2a
Auto merge of #83846 - torhovland:issue-10971, r=davidtwco

Added the --temps-dir option

Fixes #10971.

The new `--temps-dir` option puts intermediate files in a user-specified directory. This provides a fix for the issue where parallel invocations of rustc would overwrite each other's intermediate files.

No files are kept in the intermediate directory unless `-C save-temps=yes`.

If additional files are specifically requested using `--emit asm,llvm-bc,llvm-ir,obj,metadata,link,dep-info,mir`, these will be put in the output directory rather than the intermediate directory.

This is a backward-compatible change, i.e. if `--temps-dir` is not specified, the behavior is the same as before.
compiler/rustc_interface/src/passes.rs
compiler/rustc_interface/src/util.rs
compiler/rustc_session/src/config.rs
compiler/rustc_session/src/options.rs