class RbSys::CargoBuilder
def linker_args
We want to use the same linker that Ruby uses, so that the linker flags from
def linker_args cc_flag = Shellwords.split(makefile_config("CC")) linker = cc_flag.shift if WELL_KNOWN_WRAPPERS.any? { |w| linker.include?(w) } linker = cc_flag.shift end link_args = cc_flag.flat_map { |a| ["-C", "link-arg=#{a}"] } return mswin_link_args if linker == "cl" ["-C", "linker=#{linker}", *link_args] end