diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb index 27f21a228f..67ca1b264c 100644 --- a/Library/Homebrew/extend/ARGV.rb +++ b/Library/Homebrew/extend/ARGV.rb @@ -15,11 +15,6 @@ module HomebrewArgvExtension flag?("--debug") || !ENV["HOMEBREW_DEBUG"].nil? end - def bottle_arch - arch = value "bottle-arch" - arch&.to_sym - end - def cc value "cc" end diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index ac087c55c0..e4a15d2993 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -254,8 +254,8 @@ module SharedEnvExtension # @private def effective_arch - if Homebrew.args.build_bottle? && ARGV.bottle_arch - ARGV.bottle_arch + if Homebrew.args.build_bottle? && Homebrew.args.bottle_arch + Homebrew.args.bottle_arch 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 cd48e4f366..0ebba4f6bc 100644 --- a/Library/Homebrew/extend/os/linux/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/os/linux/extend/ENV/shared.rb @@ -4,7 +4,7 @@ module SharedEnvExtension # @private def effective_arch if Homebrew.args.build_bottle? - ARGV.bottle_arch || Hardware.oldest_cpu + Homebrew.args.bottle_arch || Hardware.oldest_cpu else :native end diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index ae14f768b7..dcce9bbb84 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -267,7 +267,7 @@ class FormulaInstaller return if only_deps? - if build_bottle? && (arch = ARGV.bottle_arch) && !Hardware::CPU.optimization_flags.include?(arch) + if build_bottle? && (arch = Homebrew.args.bottle_arch) && !Hardware::CPU.optimization_flags.include?(arch) raise "Unrecognized architecture for --bottle-arch: #{arch}" end @@ -699,7 +699,7 @@ class FormulaInstaller if build_bottle? args << "--build-bottle" - args << "--bottle-arch=#{ARGV.bottle_arch}" if ARGV.bottle_arch + args << "--bottle-arch=#{Homebrew.args.bottle_arch}" if Homebrew.args.bottle_arch end args << "--git" if git?