summaryrefslogtreecommitdiff
path: root/mjit.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-05 14:33:40 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-05 14:33:40 +0000
commite09c14a05f7872178d725179331c4dc7a109aa87 (patch)
tree534ebdb3ccb555bb00b8d5893946c0f53a3c0147 /mjit.c
parent14d13bc13d28c1ba98e6c672340b72860e81892c (diff)
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
Diffstat (limited to 'mjit.c')
-rw-r--r--mjit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mjit.c b/mjit.c
index efe35ee1af..fd856b30ef 100644
--- a/mjit.c
+++ b/mjit.c
@@ -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)