1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Configure static extensions only if in charge

Get rid of races in parallel configuration when using the
ext/Setup file.
This commit is contained in:
Nobuyoshi Nakada 2019-11-19 15:06:11 +09:00
parent f6239ce0fc
commit c53aec73dd
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -463,7 +463,11 @@ end unless $extstatic
if ARGV[0]
ext_prefix, exts = ARGV.shift.split('/', 2)
$extension = [exts] if exts
@gemname = exts if ext_prefix == 'gems'
if ext_prefix == 'gems'
@gemname = exts
elsif exts
$static_ext.delete_if {|t, *| !File.fnmatch(t, exts)}
end
end
ext_prefix = "#{$top_srcdir}/#{ext_prefix || 'ext'}"
exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t}