[前][次][番号順一覧][スレッド一覧]

ruby-changes:60968

From: Takashi <ko1@a...>
Date: Fri, 1 May 2020 18:55:19 +0900 (JST)
Subject: [ruby-changes:60968] e4d3d5ceab (master): Stop generating MJIT_PCH include guard

https://git.ruby-lang.org/ruby.git/commit/?id=e4d3d5ceab

From e4d3d5ceab25b7315f04f7d32a7940862b7b7946 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Fri, 1 May 2020 02:53:59 -0700
Subject: Stop generating MJIT_PCH include guard

to fix
https://ci.appveyor.com/project/ruby/ruby/builds/32577700/job/yh61rom35wt2uv39

It was for JIT compaction, and we don't support it on mswin.

diff --git a/mjit_worker.c b/mjit_worker.c
index 5a108c7..037aa29 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -1023,8 +1023,10 @@ compile_prelude(FILE *f) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L1023
     const char *s = pch_file;
     const char *e = header_name_end(s);
 
+# ifndef _MSC_VER // Visual Studio doesn't expect macro changes around headers. Anyway we don't support compaction there...
     fprintf(f, "#ifndef MJIT_PCH\n");
     fprintf(f, "#define MJIT_PCH\n");
+# endif
     fprintf(f, "#include \"");
     // print pch_file except .gch for gcc, but keep .pch for mswin
     for (; s < e; s++) {
@@ -1035,7 +1037,9 @@ compile_prelude(FILE *f) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L1037
         fputc(*s, f);
     }
     fprintf(f, "\"\n");
+# ifndef _MSC_VER
     fprintf(f, "#endif\n");
+# endif
 #endif
 
 #ifdef _WIN32
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]