Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ARGV#bottle_arch with Homebrew.args.bottle_arch #7538

Merged
merged 1 commit into from May 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions Library/Homebrew/extend/ARGV.rb
Expand Up @@ -15,11 +15,6 @@ def debug?
flag?("--debug") || !ENV["HOMEBREW_DEBUG"].nil?
end

def bottle_arch
arch = value "bottle-arch"
arch&.to_sym
end

def cc
value "cc"
end
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/extend/ENV/shared.rb
Expand Up @@ -268,8 +268,8 @@ def fortran

# @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
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/extend/os/linux/extend/ENV/shared.rb
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/formula_installer.rb
Expand Up @@ -267,7 +267,7 @@ def install

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

Expand Down Expand Up @@ -699,7 +699,7 @@ def sanitized_argv_options

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?
Expand Down