Description
In most places in the compiler temporary files are written to the output directory (using tempdir_in
). E.g.:
rust/compiler/rustc_metadata/src/fs.rs
Lines 48 to 50 in 15c4cce
rust/compiler/rustc_codegen_ssa/src/back/archive.rs
Lines 504 to 506 in 15c4cce
The one exception is compiler/rustc_codegen_ssa/src/back/link.rs
which writes to the OS temp directory (note the use of tempdir
instead of tempdir_in
):
rust/compiler/rustc_codegen_ssa/src/back/link.rs
Lines 103 to 105 in 15c4cce
I don't think there is a good reason to maintain this inconsistency?
Note that this affects -C save-temps
where you have to go hunting for the relevant temp file (or redirect the platform-specific temp directory environment variable).