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 | c68b4c5f5867110592686cdfd52fd3cbe0ee37ce (patch) | |
tree | d6e6d7802291150f44c9e22c98e77566d8ea8005 /spec/rubyspec | |
parent | 912fc583534b7b7c69089f77aeaed5dcda94a1eb (diff) | |
download | ruby-c68b4c5f5867110592686cdfd52fd3cbe0ee37ce.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
Diffstat (limited to 'spec/rubyspec')
-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}" |