Skip to content

Commit b80d2e7

Browse files
committed
Revert "FIX: workaround missing musl resolution find non musl gem and then lean on glibc that was installed via glibc gem"
This reverts commit d0bf9ee.
1 parent d0bf9ee commit b80d2e7

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

ext/mini_racer_extension/extconf.rb

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,6 @@
1111
gem 'libv8-node', MiniRacer::LIBV8_NODE_VERSION
1212
require 'libv8-node'
1313

14-
# Fix for missing aarch64-linux-musl gem in libv8-node
15-
# On some platforms (like ARM64 Alpine), the musl-specific gem might be missing.
16-
# We fallback to the glibc gem's directory if the musl one isn't found.
17-
if RUBY_PLATFORM.include?('musl')
18-
module Libv8::Node::Paths
19-
def self.platform
20-
@platform ||= begin
21-
# Replicate libv8-node's platform detection logic without side effects
22-
detected_platform = Gem::Platform.local.dup
23-
if detected_platform.version.nil?
24-
detected_platform.instance_eval { @version = 'musl' }
25-
end
26-
27-
platform_name = detected_platform.to_s.gsub(/-darwin-?\d+/, '-darwin')
28-
29-
# If the musl-specific directory is missing, try falling back to glibc
30-
unless File.exist?(File.join(vendored_source_path, platform_name))
31-
fallback = platform_name.gsub('-musl', '')
32-
if File.exist?(File.join(vendored_source_path, fallback))
33-
platform_name = fallback
34-
end
35-
end
36-
37-
platform_name
38-
end
39-
end
40-
end
41-
end
42-
4314
IS_DARWIN = RUBY_PLATFORM =~ /darwin/
4415

4516
have_library('pthread')

0 commit comments

Comments
 (0)