Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,7 @@ Rake::ExtensionTask.new do |ext|
ext.lib_dir = 'lib'
ext.source_pattern = "*.{c,h}"
ext.cross_compile = true

# Activate current cross compiled platform only.
# This is to work around the issue that `linux` platform is selected in `linux-musl` image.
ext.cross_platform = CrossLibraries.map(&:platform).select do |pl|
m = ENV["RCD_IMAGE"]&.match(/:(?<ruby_ver>[\d\.]+)-mri-(?<platform>[-\w]+)$/)
m && m[:platform] == pl
end
ext.cross_platform = CrossLibraries.map(&:platform)

ext.cross_config_options += CrossLibraries.map do |xlib|
{
Expand Down Expand Up @@ -141,7 +135,7 @@ CrossLibraries.each do |xlib|
bundle install --local &&
#{ "rake install_darwin_mig[__arm64__]" if platform =~ /arm64-darwin/ }
#{ "rake install_darwin_mig[__x86_64__]" if platform =~ /x86_64-darwin/ }
rake native:#{platform} pkg/#{$gem_spec.full_name}-#{platform}.gem MAKEOPTS=-j`nproc` RUBY_CC_VERSION=#{RakeCompilerDock.ruby_cc_version("~>2.7", "~>3.0")}
rake native:#{platform} pkg/#{$gem_spec.full_name}-#{platform}.gem MAKEOPTS=-j`nproc` RUBY_CC_VERSION=#{RakeCompilerDock.ruby_cc_version("~>2.7", "~>3.0")} RAKE_EXTENSION_TASK_NO_NATIVE=true
EOT
end
desc "Build the native binary gems"
Expand Down
Loading