diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 08d71f4185..439321ed93 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -261,6 +261,9 @@ module Superenv sig { returns(String) } def determine_optflags 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 sig { returns(String) } diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index a629bbd545..4186efe132 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -395,10 +395,6 @@ class FormulaInstaller 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| old_flag = deprecated_option.old_flag new_flag = deprecated_option.current_flag