summaryrefslogtreecommitdiff
path: root/tool/transform_mjit_header.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/transform_mjit_header.rb')
-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 = []