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

ruby-changes:51947

From: k0kubun <ko1@a...>
Date: Thu, 2 Aug 2018 23:40:42 +0900 (JST)
Subject: [ruby-changes:51947] k0kubun:r64162 (trunk): mjit.c: skip compaction on MinGW

k0kubun	2018-08-02 23:40:36 +0900 (Thu, 02 Aug 2018)

  New Revision: 64162

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64162

  Log:
    mjit.c: skip compaction on MinGW
    
    because linking multiple .o files is problematic without having `static`
    to the same function definitions.

  Modified files:
    trunk/mjit.c
Index: mjit.c
===================================================================
--- mjit.c	(revision 64161)
+++ mjit.c	(revision 64162)
@@ -872,6 +872,7 @@ link_o_to_so(const char **o_files, const https://github.com/ruby/ruby/blob/trunk/mjit.c#L872
 static void
 compact_all_jit_code(void)
 {
+# ifndef _WIN32 /* This requires header transformation but we don't transform header on Windows for now */
     struct rb_mjit_unit *unit;
     struct rb_mjit_unit_node *node;
     double start_time, end_time;
@@ -921,11 +922,11 @@ compact_all_jit_code(void) https://github.com/ruby/ruby/blob/trunk/mjit.c#L922
         add_to_list(node, &compact_units);
 
         if (!mjit_opts.save_temps) {
-#ifdef _WIN32
+#  ifdef _WIN32
             unit->so_file = strdup(so_file); /* lazily delete on `clean_object_files()` */
-#else
+#  else
             remove_file(so_file);
-#endif
+#  endif
         }
 
         CRITICAL_SECTION_START(3, "in compact_all_jit_code to read list");
@@ -952,6 +953,7 @@ compact_all_jit_code(void) https://github.com/ruby/ruby/blob/trunk/mjit.c#L953
         free(unit);
         verbose(1, "JIT compaction failure (%.1fms): Failed to compact methods", end_time - start_time);
     }
+# endif /* _WIN32 */
 }
 
 #endif /* _MSC_VER */

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

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