summaryrefslogtreecommitdiff
path: root/mjit_worker.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-07 15:09:58 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-07 15:09:58 (GMT)
commit50f2520b1fb9d52007f0deb21edd72ece2cc8a22 (patch)
treeb0c6a73ca4852c06addd215a7822ba94c4ff21d9 /mjit_worker.c
parentceab2821a0c9e933ec37a228edf3f9ed113da15e (diff)
mjit_worker.c: clean up all unnecessary files on mswin
test_jit.rb: passed all MJIT tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit_worker.c')
-rw-r--r--mjit_worker.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index 184a4a9..0b5d27f 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -756,8 +756,16 @@ compile_c_to_so(const char *c_file, const char *so_file)
free(args);
if (exit_code == 0) {
- /* remove never-used .obj file. XXX: Is there any way not to generate this? */
- if (!mjit_opts.save_temps) remove_file(obj_file);
+ /* remove never-used files (.obj, .lib, .exp, .pdb). XXX: Is there any way not to generate this? */
+ if (!mjit_opts.save_temps) {
+ char *before_dot;
+ remove_file(obj_file);
+
+ before_dot = obj_file + strlen(obj_file) - rb_strlen_lit(".obj");
+ append_lit(before_dot, ".lib"); remove_file(obj_file);
+ append_lit(before_dot, ".exp"); remove_file(obj_file);
+ append_lit(before_dot, ".pdb"); remove_file(obj_file);
+ }
}
else {
verbose(2, "compile_c_to_so: compile error: %d", exit_code);