summaryrefslogtreecommitdiff
path: root/mjit_worker.c
diff options
context:
space:
mode:
Diffstat (limited to 'mjit_worker.c')
-rw-r--r--mjit_worker.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index 0b5d27fa35..e8f36b029c 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -692,7 +692,7 @@ static int
compile_c_to_so(const char *c_file, const char *so_file)
{
int exit_code;
- const char *files[] = { NULL, NULL, NULL, NULL, NULL, "-link", libruby_pathflag, NULL };
+ const char *files[] = { NULL, NULL, NULL, NULL, NULL, NULL, "-link", libruby_pathflag, NULL };
char **args;
char *p, *obj_file;
@@ -728,6 +728,13 @@ compile_c_to_so(const char *c_file, const char *so_file)
p = append_str2(p, c_file, strlen(c_file));
*p = '\0';
+ /* files[5] = "-Fd*.pdb" */
+ files[5] = p = alloca(sizeof(char) * (rb_strlen_lit("-Fd") + strlen(pch_file) + 1));
+ p = append_lit(p, "-Fd");
+ p = append_str2(p, pch_file, strlen(pch_file) - rb_strlen_lit(".pch"));
+ p = append_lit(p, ".pdb");
+ *p = '\0';
+
args = form_args(5, CC_LDSHARED_ARGS, CC_CODEFLAG_ARGS,
files, CC_LIBS, CC_DLDFLAGS_ARGS);
if (args == NULL)