-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the --temps-dir option #83846
Added the --temps-dir option #83846
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @davidtwco (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks good to me. Could you submit a major change proposal? The compiler team's process for adding new rustc
options requires it - just to make sure that it's something we want to support going forward :)
☔ The latest upstream changes (presumably #83610) made this pull request unmergeable. Please resolve the merge conflicts. |
Apologies, this slipped past me after the major change proposal was accepted. Thanks for your patience. @bors r+ |
📌 Commit 857b19d has been approved by |
Added the --temps-dir option Fixes rust-lang#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.
Failed in rollup: #86373 (comment) |
@torhovland Ping from triage! Seems this pr's change doesn't work as expected on some platform. Do you want to investigate? Thanks! |
Not sure, but it could be that this test command doesn't run as expected on Windows:
|
Well, this is becoming a bit of a saga. The Windows tests should run fine, and they also run fine on my personal Some other tests do |
@davidtwco This needs another full test run. |
@bors r+ |
📌 Commit 13dbdc6 has been approved by |
Added the --temps-dir option Fixes rust-lang#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.
⌛ Testing commit 13dbdc6 with merge 262238f20e923810c59dab24dc00ed9c1d8649b2... |
@bors rollup=never (just to make sure it doesn't accidentally get rolled up and cause the rollup to fail) |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
@davidtwco I was able to reproduce this test failure locally, and verify that it works better with staticlib rather than cdylib. Can you please give this another go? |
@bors r+ |
📌 Commit 1793a7a has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (9dbbbb1): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
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.