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,8 +78,14 @@ begin
|
||||||
FileUtils.rm_f("#{libffi.include}/ffitarget.h")
|
FileUtils.rm_f("#{libffi.include}/ffitarget.h")
|
||||||
Logging::open do
|
Logging::open do
|
||||||
Logging.message("%p in %p\n", args, opts)
|
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."
|
raise "failed to configure libffi. Please install libffi."
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if $mswin && File.file?("#{libffi.include}/ffitarget.h")
|
if $mswin && File.file?("#{libffi.include}/ffitarget.h")
|
||||||
FileUtils.rm_f("#{libffi.include}/ffitarget.h")
|
FileUtils.rm_f("#{libffi.include}/ffitarget.h")
|
||||||
|
|
Loading…
Reference in a new issue