Skip to content

Commit

Permalink
ext: update for rake-compiler-dock 1.8.0
Browse files Browse the repository at this point in the history
- drop adding the flat namespace linker flag which rcd injects for us
- detect the need for darwin linker hack based on linker flags, not ruby version
  • Loading branch information
flavorjones committed Jan 6, 2025
1 parent d5f2a83 commit dbfd8f8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ext/nokogiri/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def do_clean
def needs_darwin_linker_hack
config_cross_build? &&
darwin? &&
Gem::Requirement.new("~> 3.2").satisfied_by?(Gem::Version.new(RbConfig::CONFIG["ruby_version"].split("+").first))
RbConfig::MAKEFILE_CONFIG["EXTDLDFLAGS"].include?("-bundle_loader")
end

#
Expand Down Expand Up @@ -764,10 +764,6 @@ def needs_darwin_linker_hack
cross_build_p = config_cross_build?
message "Cross build is #{cross_build_p ? "enabled" : "disabled"}.\n"

if needs_darwin_linker_hack
append_ldflags("-Wl,-flat_namespace")
end

require "yaml"
dependencies = YAML.load_file(File.join(PACKAGE_ROOT_DIR, "dependencies.yml"))

Expand Down

0 comments on commit dbfd8f8

Please sign in to comment.