mjit.c: o -> so is not compilation

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-07-26 13:05:47 +00:00
Родитель 2bfc133477
Коммит 781c3ca574
1 изменённых файлов: 4 добавлений и 5 удалений

9
mjit.c
Просмотреть файл

@ -815,9 +815,9 @@ compile_c_to_o(const char *c_file, const char *o_file)
return exit_code == 0;
}
/* Compile .o file to .so file. It returns 1 if it succeeds. (non-mswin) */
/* Link .o file to .so file. It returns 1 if it succeeds. (non-mswin) */
static int
compile_o_to_so(const char *o_file, const char *so_file)
link_o_to_so(const char *o_file, const char *so_file)
{
int exit_code;
const char *files[] = {
@ -840,7 +840,7 @@ compile_o_to_so(const char *o_file, const char *so_file)
free(args);
if (exit_code != 0)
verbose(2, "compile_o_to_so: compile error: %d", exit_code);
verbose(2, "link_o_to_so: link error: %d", exit_code);
return exit_code == 0;
}
@ -1018,8 +1018,7 @@ convert_unit_to_func(struct rb_mjit_unit *unit)
success = compile_c_to_so(c_file, so_file);
#else
/* splitting .c -> .o and .o -> .so to cache .o files in the future */
success = compile_c_to_o(c_file, o_file)
&& compile_o_to_so(o_file, so_file);
success = compile_c_to_o(c_file, o_file) && link_o_to_so(o_file, so_file);
if (!mjit_opts.save_temps)
remove_file(o_file);