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

fiddle: append libffi config.log

* ext/fiddle/extconf.rb: copy config.log of libffi when failed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-12-30 06:13:33 +00:00
parent b1cf08496b
commit 5cc1e95be3

View file

@ -78,8 +78,14 @@ begin
FileUtils.rm_f("#{libffi.include}/ffitarget.h")
Logging::open do
Logging.message("%p in %p\n", args, opts)
system(*args, **opts) or
unless system(*args, **opts)
begin
IO.copy_stream(libffi.dir + "/config.log", Logging.instance_variable_get(:@logfile))
rescue SystemCallError => e
Logfile.message("%s\n", e.message)
end
raise "failed to configure libffi. Please install libffi."
end
end
if $mswin && File.file?("#{libffi.include}/ffitarget.h")
FileUtils.rm_f("#{libffi.include}/ffitarget.h")