summaryrefslogtreecommitdiff
path: root/ext/fiddle
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-21 07:15:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-21 07:15:04 +0000
commit0c8b964ef7694f73aba5e1019521bc3d540efbe7 (patch)
treecb976ab08994a10fa9293a7f7d6359df32645f0c /ext/fiddle
parentbade6e467e4fade333fb8c9d7627a4381732871d (diff)
downloadruby-0c8b964ef7694f73aba5e1019521bc3d540efbe7.tar.gz
fiddle: do not disturb other checks
* ext/fiddle/extconf.rb: add the local ffi library and header just before create_makefile, not to disturb other checks. also prepend the extension path name to the local library name for static linked ext. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/fiddle')
-rw-r--r--ext/fiddle/extconf.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index f0c7ef41c5..8f1ff547fa 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -33,8 +33,6 @@ begin
libffi.lib = "#{libffi.builddir}/.libs"
libffi.a = "#{libffi.lib}/libffi.#{$LIBEXT}"
libffi.cflags = RbConfig.expand("$(CFLAGS)", CONFIG.merge("warnflags"=>""))
- $LIBPATH.unshift libffi.lib
- $INCFLAGS << " -I" << libffi.include
ver = ver[/libffi-(.*)/, 1]
end
end
@@ -79,6 +77,11 @@ types.each do |type, signed|
end
end
+if libffi
+ $LIBPATH.unshift libffi.lib
+ $INCFLAGS << " -I" << libffi.include
+ $LOCAL_LIBS.prepend("#{libffi.a} ").strip!
+end
create_makefile 'fiddle' do |conf|
next conf unless libffi
if $gnumake
@@ -102,6 +105,8 @@ create_makefile 'fiddle' do |conf|
end
if libffi
+ $LIBPATH.pop
+ $LOCAL_LIBS.prepend("ext/fiddle/")
args = [$make, *sysquote($mflags)]
Logging::open do
Logging.message("%p\n", args)