Skip to content
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

temp dir rustc.* is deleted even when -C save-temps applys #38068

Closed
liigo opened this issue Nov 29, 2016 · 3 comments · Fixed by #42864
Closed

temp dir rustc.* is deleted even when -C save-temps applys #38068

liigo opened this issue Nov 29, 2016 · 3 comments · Fixed by #42864
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@liigo
Copy link
Contributor

liigo commented Nov 29, 2016

"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\liblibc-b8291b00ed3b11ca.rlib" 
"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\libstd-1357b93f.rlib" 
"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\libpanic_unwind-1357b93f.rlib" 
"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\libunwind-1357b93f.rlib" 
"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\liblibc-1357b93f.rlib" 
"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\librand-1357b93f.rlib" 
"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\libcollections-1357b93f.rlib" 
"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\liballoc-1357b93f.rlib" 
"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\liballoc_system-1357b93f.rlib" 
"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\librustc_unicode-1357b93f.rlib" 
"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\libcore-1357b93f.rlib" 
"C:\\Users\\liigo\\AppData\\Local\\Temp\\rustc.wRCEMTOH5I1k\\libcompiler_builtins-1357b93f.rlib" 
@steveklabnik steveklabnik added A-compiler T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 29, 2016
@Mark-Simulacrum
Copy link
Member

Tagging as E-easy and E-mentor. The fix here involves changing the code here to call let _ = tmpdir.into_path() to prevent the temp dir from destroying itself. This should be wrapped in an if like this one:

if !sess.opts.cg.save_temps {
if sess.opts.output_types.should_trans() {
for obj in object_filenames(trans, outputs) {
remove(sess, &obj);
}
}
remove(sess, &outputs.with_extension(METADATA_OBJ_NAME));
}
.

@Mark-Simulacrum Mark-Simulacrum added A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Jun 20, 2017
@slo1
Copy link
Contributor

slo1 commented Jun 21, 2017

Hi, I want to try working on this.

@Mark-Simulacrum
Copy link
Member

Go ahead! Let me know if you need any assistance - feel free to either reach out here or over IRC (simulacrum is my handle there).

bors added a commit that referenced this issue Jun 24, 2017
Saves created temp directory if save-temps option is used.

Should fix #38068.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants