End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Ext::CargoBuilder#maybe_resolve_ldflag_variable
maybe_resolve_ldflag_variable(input_arg, dest_dir)
lib/rubygems/ext/cargo_builder.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/rubygems/ext/cargo_builder.rb, line 207
def maybe_resolve_ldflag_variable(input_arg, dest_dir)
var_matches = input_arg.match(/\$\((\w+)\)/)
return input_arg unless var_matches
var_name = var_matches[1]
return input_arg if var_name.nil? || var_name.chomp.empty?
case var_name
# On windows, it is assumed that mkmf has setup an exports file for the
# extension, so we have to to create one ourselves.
when "DEFFILE"
write_deffile(dest_dir)
else
RbConfig::CONFIG[var_name]
end
end
Interpolate substition vars in the arg (i.e. $(DEFFILE))
See also
#makefile_config
#mingw_target?
#linker_args
#mkmf_libpath
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1