diff options
author | Hiroshi SHIBATA <[email protected]> | 2022-11-11 15:05:59 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2022-11-11 17:24:08 +0900 |
commit | 28611be6ee84ba8eb19e667a70ae129833b98b8b (patch) | |
tree | d6556c2f06de009ebe7aa19564372f6251ad36e0 /lib | |
parent | de159c5a855dd53bfd9ce284c9099306724560a7 (diff) |
Merge RubyGems/Bundler master from ee2f8398324af4bc1b95f7565ce2fda98126e026v3_2_0_preview3
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6715
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/definition.rb | 2 | ||||
-rw-r--r-- | lib/bundler/lazy_specification.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/ext/cargo_builder.rb | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 95be7a7e27..3836841f3f 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -357,7 +357,7 @@ module Bundler "bundle config unset deployment" end msg << "\n\nIf this is a development machine, remove the #{Bundler.default_gemfile} " \ - "freeze \nby running `#{suggested_command}`." + "freeze \nby running `#{suggested_command}`." if suggested_command end added = [] diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb index f5fe2e64ae..949e8264ba 100644 --- a/lib/bundler/lazy_specification.rb +++ b/lib/bundler/lazy_specification.rb @@ -79,9 +79,7 @@ module Bundler candidates = if source.is_a?(Source::Path) || !ruby_platform_materializes_to_ruby_platform? target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform - source.specs.search(Dependency.new(name, version)).select do |spec| - MatchPlatform.platforms_match?(spec.platform, target_platform) - end + GemHelpers.select_best_platform_match(source.specs.search(Dependency.new(name, version)), target_platform) else source.specs.search(self) end diff --git a/lib/rubygems/ext/cargo_builder.rb b/lib/rubygems/ext/cargo_builder.rb index e33b07a8a2..24c1d3ae6e 100644 --- a/lib/rubygems/ext/cargo_builder.rb +++ b/lib/rubygems/ext/cargo_builder.rb @@ -37,6 +37,7 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder def build_env build_env = rb_config_env build_env["RUBY_STATIC"] = "true" if ruby_static? && ENV.key?("RUBY_STATIC") + build_env["RUSTFLAGS"] = "#{ENV["RUSTFLAGS"]} --cfg=rb_sys_gem".strip build_env end @@ -92,6 +93,9 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder # 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 |