End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Ext::CargoBuilder#platform_specific_rustc_args
platform_specific_rustc_args(dest_dir, flags = [])
lib/rubygems/ext/cargo_builder.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/ext/cargo_builder.rb, line 82
def platform_specific_rustc_args(dest_dir, flags = [])
if mingw_target?
# On mingw platforms, mkmf adds libruby to the linker flags
flags += libruby_args(dest_dir)
# Make sure ALSR is used on mingw
# see https://github.com/rust-lang/rust/pull/75406/files
flags += ["-C", "link-arg=-Wl,--dynamicbase"]
flags += ["-C", "link-arg=-Wl,--disable-auto-image-base"]
# If the gem is installed on a host with build tools installed, but is
# run on one that isn't the missing libraries will cause the extension
# to fail on start.
flags += ["-C", "link-arg=-static-libgcc"]
elsif darwin_target?
# Ventura does not always have this flag enabled
flags += ["-C", "link-arg=-Wl,-undefined,dynamic_lookup"]
end
flags
end
No documentation available
See also
#msvc_target?
#profile_target_directory
#mkmf_libpath
#rb_config_env
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2