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:
parent
b1cf08496b
commit
5cc1e95be3
1 changed files with 7 additions and 1 deletions
|
@ -78,9 +78,15 @@ 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")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue