Merge pull request #11352 from carlocab/custom-arch

extend/ENV/super: allow bottles with custom architectures
This commit is contained in:
Carlo Cabrera 2021-05-10 14:30:41 +01:00 committed by GitHub
commit 734defb1a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -261,6 +261,9 @@ module Superenv
sig { returns(String) } sig { returns(String) }
def determine_optflags def determine_optflags
Hardware::CPU.optimization_flags.fetch(effective_arch) Hardware::CPU.optimization_flags.fetch(effective_arch)
rescue KeyError
odebug "Building a bottle for custom architecture (#{effective_arch})..."
Hardware::CPU.arch_flag(effective_arch)
end end
sig { returns(String) } sig { returns(String) }

View File

@ -395,10 +395,6 @@ class FormulaInstaller
return if only_deps? return if only_deps?
if build_bottle? && (arch = @bottle_arch) && Hardware::CPU.optimization_flags.exclude?(arch.to_sym)
raise CannotInstallFormulaError, "Unrecognized architecture for --bottle-arch: #{arch}"
end
formula.deprecated_flags.each do |deprecated_option| formula.deprecated_flags.each do |deprecated_option|
old_flag = deprecated_option.old_flag old_flag = deprecated_option.old_flag
new_flag = deprecated_option.current_flag new_flag = deprecated_option.current_flag