summaryrefslogtreecommitdiff
path: root/tool/transform_mjit_header.rb
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-07 14:25:03 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-07 14:25:03 +0000
commitcf03675ce82d641b2574220c6c89d2152517a15b (patch)
tree9dfc6e564f6ad64db4cd4cc29eb45d70a28a9675 /tool/transform_mjit_header.rb
parent93f0613753abd05dcc4df035624e4c33358a0c72 (diff)
transform_mjit_header.rb: very verbose error log
for debugging AIX..... I have no idea why AIX's gcc is failing to transform MJIT header.... Today's CI output: https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180207T113303Z.log.html.gz#make git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 8ace15851b..4347df0fff 100644
--- a/tool/transform_mjit_header.rb
+++ b/tool/transform_mjit_header.rb
@@ -93,10 +93,12 @@ module MJITHeader
out = IO.popen(cmd, err: [:child, :out], &:read)
STDERR.puts "error in #{stage} header file:\n#{out}"
- if match = out.match(/error: conflicting types for '(?<name>[^']+)'/)
- unless (related_lines = code.lines.grep(/#{match[:name]}/)).empty?
- STDERR.puts "possibly related lines:\n#{related_lines.join("\n")}"
- end
+ if match = out.match(/error: conflicting types for '[^']+'/)
+ STDERR.puts "\nDumping information for debugging:\n"\
+ "[ORIGINAL_HEADER_BEGIN]-----------------\n#{File.binread(ARGV[1])}\n"\
+ "[ORIGINAL_HEADER_END]-----------------\n\n"\
+ "[TRANSFORMED_HEADER_BEGIN]-----------------\n#{code}\n"\
+ "[TRANSFORMED_HEADER_END]-----------------\n"
end
exit false
end