mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
gold-plugin: delete the output file for OT_DISABLE
bfd creates the output file early, so calling exit(0) is not enough, the file needs to be explicitly deleted. Patch by: H.J. Lu <hjl.tools@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228946 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c3c5d7c2d6
commit
17a113d26b
@ -869,8 +869,13 @@ static ld_plugin_status all_symbols_read_hook(void) {
|
|||||||
llvm_shutdown();
|
llvm_shutdown();
|
||||||
|
|
||||||
if (options::TheOutputType == options::OT_BC_ONLY ||
|
if (options::TheOutputType == options::OT_BC_ONLY ||
|
||||||
options::TheOutputType == options::OT_DISABLE)
|
options::TheOutputType == options::OT_DISABLE) {
|
||||||
|
if (options::TheOutputType == options::OT_DISABLE)
|
||||||
|
// Remove the output file here since ld.bfd creates the output file
|
||||||
|
// early.
|
||||||
|
sys::fs::remove(output_name);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user