Sha256: 95d6b165e10dbb4c747c962a53cb97892760dac537e93e07e9403db3d56cd104
Contents?: true
Size: 642 Bytes
Versions: 50
Compression:
Stored size: 642 Bytes
Contents
# frozen_string_literal: true module RbSys class CargoBuilder # Converts Ruby link flags into something cargo understands class LinkFlagConverter def self.convert(arg) case arg.chomp when /^-L\s*(.+)$/ ["-L", "native=#{$1}"] when /^--library=(\w+\S+)$/, /^-l\s*(\w+\S+)$/ ["-l", $1] when /^-l\s*:lib(\S+).a$/ ["-l", "static=#{$1}"] when /^-l\s*:lib(\S+).(so|dylib|dll)$/ ["-l", "dylib=#{$1}"] when /^-F\s*(.*)$/ ["-l", "framework=#{$1}"] else ["-C", "link_arg=#{arg}"] end end end end end
Version data entries
50 entries across 50 versions & 1 rubygems