diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-30 06:13:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-30 06:13:33 +0000 |
commit | 5cc1e95be3f552b907b3f5cfc2d1d79907087273 (patch) | |
tree | fb78f2e810cea1224870e10af1d2596ca8c09bdf /ext | |
parent | b1cf08496bd4eed402abe084552bf7dcf5a8fe09 (diff) | |
download | ruby-5cc1e95be3f552b907b3f5cfc2d1d79907087273.tar.gz |
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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/fiddle/extconf.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb index f505a280ad..a05eccf008 100644 --- a/ext/fiddle/extconf.rb +++ b/ext/fiddle/extconf.rb @@ -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") |