1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
k0kubun 2018-02-05 12:19:38 +00:00
parent 70a7bc3967
commit 9895f69460

View file

@ -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 = []