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: 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
This commit is contained in:
nobu 2018-03-17 02:18:46 +00:00
parent 952b70e221
commit 3f8711a092

View file

@ -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