mjit.c: use -Tc flag explicitly

This option makes sure that the argument is C source file.
Probably this is not needed, but since I'm debugging it, I want to
exclude any failure possibility for now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-08-05 14:33:40 +00:00
parent 14d13bc13d
commit e09c14a05f

7
mjit.c
View File

@ -754,7 +754,12 @@ compile_c_to_so(const char *c_file, const char *so_file)
p = append_lit(p, ".obj");
*p = '\0';
files[3] = c_file;
/* files[3] = "-Tc*.c" */
files[3] = p = (char *)alloca(sizeof(char) * (rb_strlen_lit("-Tc") + strlen(c_file) + 1));
p = append_lit(p, "-Tc");
p = append_str2(p, c_file, strlen(c_file));
*p = '\0';
args = form_args(5, CC_LDSHARED_ARGS, CC_CODEFLAG_ARGS,
files, CC_LIBS, CC_DLDFLAGS_ARGS);
if (args == NULL)