mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
extmk.rb: no static-ext in gems
* ext/extmk.rb (extmake): extension libraries in gems cannot link statically. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
93bc502436
commit
5e0fa644ed
2 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Aug 15 11:46:50 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/extmk.rb (extmake): extension libraries in gems cannot link
|
||||||
|
statically.
|
||||||
|
|
||||||
Sun Aug 14 22:35:40 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Aug 14 22:35:40 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* id_table.c (hash_table_extend): should not shrink the table than
|
* id_table.c (hash_table_extend): should not shrink the table than
|
||||||
|
|
10
ext/extmk.rb
10
ext/extmk.rb
|
@ -131,7 +131,7 @@ def extract_makefile(makefile, keep = true)
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def extmake(target, basedir = 'ext')
|
def extmake(target, basedir = (maybestatic = 'ext'))
|
||||||
unless $configure_only || verbose?
|
unless $configure_only || verbose?
|
||||||
print "#{$message} #{target}\n"
|
print "#{$message} #{target}\n"
|
||||||
$stdout.flush
|
$stdout.flush
|
||||||
|
@ -269,7 +269,7 @@ def extmake(target, basedir = 'ext')
|
||||||
end
|
end
|
||||||
if $static and ok and !$objs.empty? and !noinstall
|
if $static and ok and !$objs.empty? and !noinstall
|
||||||
args += ["static"] unless $clean
|
args += ["static"] unless $clean
|
||||||
$extlist.push [$static, target, $target, $preload]
|
$extlist.push [(maybestatic ? $static : false), target, $target, $preload]
|
||||||
end
|
end
|
||||||
FileUtils.rm_f(old_cleanfiles - $distcleanfiles - $cleanfiles)
|
FileUtils.rm_f(old_cleanfiles - $distcleanfiles - $cleanfiles)
|
||||||
FileUtils.rm_f(old_objs - $objs)
|
FileUtils.rm_f(old_objs - $objs)
|
||||||
|
@ -613,7 +613,8 @@ unless $extlist.empty?
|
||||||
list = $extlist.dup
|
list = $extlist.dup
|
||||||
built = []
|
built = []
|
||||||
while e = list.shift
|
while e = list.shift
|
||||||
_, target, feature, required = e
|
static, target, feature, required = e
|
||||||
|
next unless static
|
||||||
if required and !(required -= built).empty?
|
if required and !(required -= built).empty?
|
||||||
l = list.size
|
l = list.size
|
||||||
if (while l > 0; break true if required.include?(list[l-=1][1]) end)
|
if (while l > 0; break true if required.include?(list[l-=1][1]) end)
|
||||||
|
@ -737,7 +738,8 @@ if $configure_only and $command_output
|
||||||
mf.puts
|
mf.puts
|
||||||
targets = %w[all install static install-so install-rb clean distclean realclean]
|
targets = %w[all install static install-so install-rb clean distclean realclean]
|
||||||
targets.each do |tgt|
|
targets.each do |tgt|
|
||||||
mf.puts "#{tgt}: $(extensions:/.=/#{tgt}) $(gems:/.=/#{tgt})"
|
mf.puts "#{tgt}: $(extensions:/.=/#{tgt})"
|
||||||
|
mf.puts "#{tgt}: $(gems:/.=/#{tgt})" unless tgt == 'static'
|
||||||
mf.puts "#{tgt}: note" unless /clean\z/ =~ tgt
|
mf.puts "#{tgt}: note" unless /clean\z/ =~ tgt
|
||||||
end
|
end
|
||||||
mf.puts
|
mf.puts
|
||||||
|
|
Loading…
Reference in a new issue