Get rid of cccfg? method
This commit is contained in:
parent
fd031f256a
commit
d4e24dce0a
@ -26,11 +26,12 @@ end
|
|||||||
LOGGER = Logger.new
|
LOGGER = Logger.new
|
||||||
|
|
||||||
class Cmd
|
class Cmd
|
||||||
attr_reader :prefix, :cellar, :tmpdir, :sysroot
|
attr_reader :config, :prefix, :cellar, :tmpdir, :sysroot
|
||||||
|
|
||||||
def initialize path, args
|
def initialize path, args
|
||||||
@arg0 = File.basename(path).freeze
|
@arg0 = File.basename(path).freeze
|
||||||
@args = args.freeze
|
@args = args.freeze
|
||||||
|
@config = ENV.fetch("HOMEBREW_CCCFG") { "" }
|
||||||
@prefix = ENV['HOMEBREW_PREFIX']
|
@prefix = ENV['HOMEBREW_PREFIX']
|
||||||
@cellar = ENV['HOMEBREW_CELLAR']
|
@cellar = ENV['HOMEBREW_CELLAR']
|
||||||
@tmpdir = ENV['HOMEBREW_TEMP']
|
@tmpdir = ENV['HOMEBREW_TEMP']
|
||||||
@ -285,28 +286,24 @@ class Cmd
|
|||||||
ENV.key? 'as_nl'
|
ENV.key? 'as_nl'
|
||||||
end
|
end
|
||||||
|
|
||||||
def cccfg? flags
|
|
||||||
flags.split('').all?{|c| ENV['HOMEBREW_CCCFG'].include? c } if ENV['HOMEBREW_CCCFG']
|
|
||||||
end
|
|
||||||
|
|
||||||
def refurbish_args?
|
def refurbish_args?
|
||||||
cccfg?("O")
|
config.include?("O")
|
||||||
end
|
end
|
||||||
|
|
||||||
def cxx11?
|
def cxx11?
|
||||||
cccfg?("x")
|
config.include?("x")
|
||||||
end
|
end
|
||||||
|
|
||||||
def libcxx?
|
def libcxx?
|
||||||
cccfg?("g")
|
config.include?("g")
|
||||||
end
|
end
|
||||||
|
|
||||||
def libstdcxx?
|
def libstdcxx?
|
||||||
cccfg?("h")
|
config.include?("h")
|
||||||
end
|
end
|
||||||
|
|
||||||
def permit_arch_flags?
|
def permit_arch_flags?
|
||||||
cccfg?("K")
|
config.include?("K")
|
||||||
end
|
end
|
||||||
|
|
||||||
def canonical_path(path)
|
def canonical_path(path)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user