summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-05 12:19:38 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-05 12:19:38 +0000
commit9895f694603154679ff55b224607f45996dc3458 (patch)
tree4f08503da54d89c8d2d455719548c62e03934eb2
parent70a7bc396797cc0808939e092b2d6f9f19eb8ab1 (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--tool/transform_mjit_header.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/tool/transform_mjit_header.rb b/tool/transform_mjit_header.rb
index 23f64a8576..c5ddae93c9 100644
--- a/tool/transform_mjit_header.rb
+++ b/tool/transform_mjit_header.rb
@@ -133,17 +133,19 @@ if MJITHeader.windows?
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 = []