class RbSys::CargoBuilder
def maybe_resolve_ldflag_variable(input_arg, dest_dir)
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