diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-15 11:16:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-15 11:16:25 +0000 |
commit | f1a23b7562c6659d783cedf2121e3b918e777300 (patch) | |
tree | d6e6d7802291150f44c9e22c98e77566d8ea8005 | |
parent | fda7d78f89fc5aa18a1d66b90ae15816bc0b39c1 (diff) | |
download | ruby-f1a23b7562c6659d783cedf2121e3b918e777300.tar.gz |
optional/capi: fix link on mingw
* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
LIBRUBYARG is always necessary unless dynamic lookup is allowed.
strip $(DEFFILE) from DLDFLAGS on mingw.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | spec/rubyspec/optional/capi/spec_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/rubyspec/optional/capi/spec_helper.rb b/spec/rubyspec/optional/capi/spec_helper.rb index d0534d8ce0..1c16261714 100644 --- a/spec/rubyspec/optional/capi/spec_helper.rb +++ b/spec/rubyspec/optional/capi/spec_helper.rb @@ -83,13 +83,13 @@ def compile_extension(name) ldshared = RbConfig::CONFIG["LDSHARED"] ldshared += " #{RbConfig::CONFIG["ARCH_FLAG"]}" if RbConfig::CONFIG["ARCH_FLAG"] - libs = RbConfig::CONFIG["LIBS"] + libs = "#{RbConfig::CONFIG["LIBRUBYARG"]} #{RbConfig::CONFIG["LIBS"]}" dldflags = "#{RbConfig::CONFIG["LDFLAGS"]} #{RbConfig::CONFIG["DLDFLAGS"]} #{RbConfig::CONFIG["EXTDLDFLAGS"]}" dldflags.sub!(/-Wl,-soname,\S+/, '') + dldflags.sub!(/\$\(DEFFILE\)/, '') if /mswin/ =~ RUBY_PLATFORM dldflags.sub!("$(LIBPATH)", RbConfig::CONFIG["LIBPATHFLAG"] % path) - libs += RbConfig::CONFIG["LIBRUBY"] outflag = RbConfig::CONFIG["OUTFLAG"] link_cmd = "#{ldshared} #{outflag}#{lib} #{obj} #{libs} -link #{dldflags} /export:Init_#{ext}" |