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

ruby-changes:50108

From: k0kubun <ko1@a...>
Date: Mon, 5 Feb 2018 21:19:44 +0900 (JST)
Subject: [ruby-changes:50108] k0kubun:r62226 (trunk): transform_mjit_header.rb: check initial code

k0kubun	2018-02-05 21:19:38 +0900 (Mon, 05 Feb 2018)

  New Revision: 62226

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

  Log:
    transform_mjit_header.rb: check initial code
    
    separating the macros. Applying the kept macros to code which is already
    affected by the macros may cause errors in initial code.
    
    This is hopefully the final fix for icc build failure.

  Modified files:
    trunk/tool/transform_mjit_header.rb
Index: tool/transform_mjit_header.rb
===================================================================
--- tool/transform_mjit_header.rb	(revision 62225)
+++ tool/transform_mjit_header.rb	(revision 62226)
@@ -133,17 +133,19 @@ if MJITHeader.windows? https://github.com/ruby/ruby/blob/trunk/tool/transform_mjit_header.rb#L133
 end
 MJITHeader.remove_predefined_macros!(code)
 
-# Check initial file correctness
-MJITHeader.check_code!(code, cc, cflags, 'initial')
-
 if MJITHeader.windows? # transformation is broken with Windows headers for now
+  MJITHeader.check_code!(code, cc, cflags, 'initial')
   puts "\nSkipped transforming external functions to static on Windows."
   MJITHeader.write(code, outfile)
   exit
+else
+  macro, code = MJITHeader.separate_macro_and_code(code) # note: this does not work on MinGW
+
+  # Check initial file correctness in the manner of final output.
+  MJITHeader.check_code!("#{code}#{macro}", cc, cflags, 'initial')
 end
 puts "\nTransforming external functions to static:"
 
-macro, code = MJITHeader.separate_macro_and_code(code) # note: this does not work on MinGW
 stop_pos     = -1
 extern_names = []
 

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

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