Merge pull request #1698 from MikeMcQuaid/deprecate-32-bit
Deprecate 32-bit options.
This commit is contained in:
commit
1d2390b2de
@ -84,13 +84,6 @@ class BuildOptions
|
|||||||
include?("c++11") && option_defined?("c++11")
|
include?("c++11") && option_defined?("c++11")
|
||||||
end
|
end
|
||||||
|
|
||||||
# True if a {Formula} is being built in 32-bit/x86 mode.
|
|
||||||
# This is needed for some use-cases though we prefer to build Universal
|
|
||||||
# when a 32-bit version is needed.
|
|
||||||
def build_32_bit?
|
|
||||||
include?("32-bit") && option_defined?("32-bit")
|
|
||||||
end
|
|
||||||
|
|
||||||
# @private
|
# @private
|
||||||
def used_options
|
def used_options
|
||||||
@options & @args
|
@options & @args
|
||||||
|
|||||||
@ -19,3 +19,6 @@ require "compat/xcode"
|
|||||||
require "compat/software_spec"
|
require "compat/software_spec"
|
||||||
require "compat/utils"
|
require "compat/utils"
|
||||||
require "compat/json"
|
require "compat/json"
|
||||||
|
require "compat/ARGV"
|
||||||
|
require "compat/build_options"
|
||||||
|
require "compat/tab"
|
||||||
|
|||||||
6
Library/Homebrew/compat/ARGV.rb
Normal file
6
Library/Homebrew/compat/ARGV.rb
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
module HomebrewArgvExtension
|
||||||
|
def build_32_bit?
|
||||||
|
# odeprecated "ARGV.build_32_bit?"
|
||||||
|
include? "--32-bit"
|
||||||
|
end
|
||||||
|
end
|
||||||
6
Library/Homebrew/compat/build_options.rb
Normal file
6
Library/Homebrew/compat/build_options.rb
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
class BuildOptions
|
||||||
|
def build_32_bit?
|
||||||
|
# odeprecated "build.build_32_bit?"
|
||||||
|
include?("32-bit") && option_defined?("32-bit")
|
||||||
|
end
|
||||||
|
end
|
||||||
6
Library/Homebrew/compat/tab.rb
Normal file
6
Library/Homebrew/compat/tab.rb
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
class Tab < OpenStruct
|
||||||
|
def build_32_bit?
|
||||||
|
# odeprecated "Tab.build_32_bit?"
|
||||||
|
include?("32-bit")
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -448,8 +448,13 @@ class FormulaAuditor
|
|||||||
|
|
||||||
def audit_options
|
def audit_options
|
||||||
formula.options.each do |o|
|
formula.options.each do |o|
|
||||||
|
if o.name != "32-bit"
|
||||||
|
problem "macOS has been 64-bit only since 10.6 so 32-bit options are deprecated."
|
||||||
|
end
|
||||||
|
|
||||||
next unless @strict
|
next unless @strict
|
||||||
if o.name !~ /with(out)?-/ && o.name != "c++11" && o.name != "universal" && o.name != "32-bit"
|
|
||||||
|
if o.name !~ /with(out)?-/ && o.name != "c++11" && o.name != "universal"
|
||||||
problem "Options should begin with with/without. Migrate '--#{o.name}' with `deprecated_option`."
|
problem "Options should begin with with/without. Migrate '--#{o.name}' with `deprecated_option`."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -229,13 +229,6 @@ module HomebrewArgvExtension
|
|||||||
include? "--universal"
|
include? "--universal"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Request a 32-bit only build.
|
|
||||||
# This is needed for some use-cases though we prefer to build Universal
|
|
||||||
# when a 32-bit version is needed.
|
|
||||||
def build_32_bit?
|
|
||||||
include? "--32-bit"
|
|
||||||
end
|
|
||||||
|
|
||||||
def build_bottle?
|
def build_bottle?
|
||||||
include?("--build-bottle") || !ENV["HOMEBREW_BUILD_BOTTLE"].nil?
|
include?("--build-bottle") || !ENV["HOMEBREW_BUILD_BOTTLE"].nil?
|
||||||
end
|
end
|
||||||
@ -294,7 +287,6 @@ module HomebrewArgvExtension
|
|||||||
|
|
||||||
build_flags << "--HEAD" if build_head?
|
build_flags << "--HEAD" if build_head?
|
||||||
build_flags << "--universal" if build_universal?
|
build_flags << "--universal" if build_universal?
|
||||||
build_flags << "--32-bit" if build_32_bit?
|
|
||||||
build_flags << "--build-bottle" if build_bottle?
|
build_flags << "--build-bottle" if build_bottle?
|
||||||
build_flags << "--build-from-source" if build_from_source?
|
build_flags << "--build-from-source" if build_from_source?
|
||||||
|
|
||||||
|
|||||||
@ -13,9 +13,8 @@ class SoftwareSpec
|
|||||||
extend Forwardable
|
extend Forwardable
|
||||||
|
|
||||||
PREDEFINED_OPTIONS = {
|
PREDEFINED_OPTIONS = {
|
||||||
:universal => Option.new("universal", "Build a universal binary"),
|
universal: Option.new("universal", "Build a universal binary"),
|
||||||
:cxx11 => Option.new("c++11", "Build using C++11 mode"),
|
cxx11: Option.new("c++11", "Build using C++11 mode"),
|
||||||
"32-bit" => Option.new("32-bit", "Build 32-bit only"),
|
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
attr_reader :name, :full_name, :owner
|
attr_reader :name, :full_name, :owner
|
||||||
|
|||||||
@ -218,10 +218,6 @@ class Tab < OpenStruct
|
|||||||
include?("c++11")
|
include?("c++11")
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_32_bit?
|
|
||||||
include?("32-bit")
|
|
||||||
end
|
|
||||||
|
|
||||||
def head?
|
def head?
|
||||||
spec == :head
|
spec == :head
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user