From 3f8711a092ee99cea9ce755c149b5d07bc0f7b85 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 17 Mar 2018 02:18:46 +0000 Subject: transform_mjit_header.rb: read output and errors * tool/transform_mjit_header.rb (MJITHeader.check_code): read output and errors than discarding errors. also cl.exe prints the source file name which is a garbage at this time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/transform_mjit_header.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tool/transform_mjit_header.rb') diff --git a/tool/transform_mjit_header.rb b/tool/transform_mjit_header.rb index 1f4e25d3aa..f53f1252cb 100644 --- a/tool/transform_mjit_header.rb +++ b/tool/transform_mjit_header.rb @@ -114,8 +114,8 @@ module MJITHeader def self.check_code!(code, cc, cflags, stage) with_code(code) do |path| cmd = "#{cc} #{cflags} #{path}" - unless system(cmd, err: File::NULL) - out = IO.popen(cmd, err: [:child, :out], &:read) + out = IO.popen(cmd, err: [:child, :out], &:read) + unless $?.success? STDERR.puts "error in #{stage} header file:\n#{out}" exit false end -- cgit v1.2.3