Skip to content

Commit

Permalink
Use normalized cpu in normalized gem platform
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Jul 20, 2023
1 parent 37a3724 commit edab924
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ext/sass/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -413,22 +413,20 @@ module SassConfig
end

def gem_platform
platform = Gem::Platform.new("#{RbConfig::CONFIG['host_cpu']}-#{RbConfig::CONFIG['host_os']}")
platform = Gem::Platform.new("#{Platform::EMULATION || Platform::CPU}-#{RbConfig::CONFIG['host_os']}")
case Platform::OS
when 'darwin'
Gem::Platform.new([platform.cpu, platform.os])
Gem::Platform.new([RbConfig::CONFIG['host_cpu'], platform.os])
when 'linux'
if platform.version&.start_with?('gnu')
platform
else
Gem::Platform.new([platform.cpu, platform.os, "gnu#{platform.version}"])
end
when 'windows'
case Platform::EMULATION || Platform::CPU
case platform.cpu
when 'x86_64'
Gem::Platform.new('x64-mingw32')
when 'i386'
Gem::Platform.new('x86-mingw32')
else
Gem::Platform.new([platform.cpu, 'mingw32'])
end
Expand Down

0 comments on commit edab924

Please sign in to comment.