diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index e4a15d299392c37c3e55f945cca0faf46eff0a2c..36b84cf50bcd3ac72e8247a01d900de7029a3e70 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -255,7 +255,7 @@ module SharedEnvExtension # @private def effective_arch if Homebrew.args.build_bottle? && Homebrew.args.bottle_arch - Homebrew.args.bottle_arch + Homebrew.args.bottle_arch.to_sym else Hardware.oldest_cpu end diff --git a/Library/Homebrew/extend/os/linux/extend/ENV/shared.rb b/Library/Homebrew/extend/os/linux/extend/ENV/shared.rb index 0ebba4f6bc7efd6c081772cd8f620d96d1db19db..a7eb3b9671e2180e3d1324aa5227e3926cbdbf17 100644 --- a/Library/Homebrew/extend/os/linux/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/os/linux/extend/ENV/shared.rb @@ -3,8 +3,10 @@ module SharedEnvExtension # @private def effective_arch - if Homebrew.args.build_bottle? - Homebrew.args.bottle_arch || Hardware.oldest_cpu + if Homebrew.args.build_bottle? && Homebrew.args.bottle_arch + Homebrew.args.bottle_arch.to_sym + elsif Homebrew.args.build_bottle? + Hardware.oldest_cpu else :native end diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 18ed7cb437d28e9b76573dc6b4f191ed9d465238..c2f07c73e204bedd9d4931a9e3f1015f44c9baa5 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -269,7 +269,7 @@ class FormulaInstaller return if only_deps? - if build_bottle? && (arch = Homebrew.args.bottle_arch) && !Hardware::CPU.optimization_flags.include?(arch) + if build_bottle? && (arch = Homebrew.args.bottle_arch) && !Hardware::CPU.optimization_flags.include?(arch.to_sym) raise "Unrecognized architecture for --bottle-arch: #{arch}" end