Merge pull request #4380 from maxim-belkin/fix-cccfgfgccfg
Properly append values to HOMEBREW_CCCFG
This commit is contained in:
commit
5f5e2c7eaa
@ -54,6 +54,10 @@ module SharedEnvExtension
|
|||||||
remove CC_FLAG_VARS, val
|
remove CC_FLAG_VARS, val
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def append_to_cccfg(value)
|
||||||
|
append("HOMEBREW_CCCFG", value, "")
|
||||||
|
end
|
||||||
|
|
||||||
def append(keys, value, separator = " ")
|
def append(keys, value, separator = " ")
|
||||||
value = value.to_s
|
value = value.to_s
|
||||||
Array(keys).each do |key|
|
Array(keys).each do |key|
|
||||||
|
|||||||
@ -285,7 +285,7 @@ module Superenv
|
|||||||
end
|
end
|
||||||
|
|
||||||
def permit_arch_flags
|
def permit_arch_flags
|
||||||
append "HOMEBREW_CCCFG", "K"
|
append_to_cccfg "K"
|
||||||
end
|
end
|
||||||
|
|
||||||
def m32
|
def m32
|
||||||
@ -298,26 +298,26 @@ module Superenv
|
|||||||
|
|
||||||
def cxx11
|
def cxx11
|
||||||
if homebrew_cc == "clang"
|
if homebrew_cc == "clang"
|
||||||
append "HOMEBREW_CCCFG", "x", ""
|
append_to_cccfg "x"
|
||||||
append "HOMEBREW_CCCFG", "g", ""
|
append_to_cccfg "g"
|
||||||
elsif compiler_with_cxx11_support?(homebrew_cc)
|
elsif compiler_with_cxx11_support?(homebrew_cc)
|
||||||
append "HOMEBREW_CCCFG", "x", ""
|
append_to_cccfg "x"
|
||||||
else
|
else
|
||||||
raise "The selected compiler doesn't support C++11: #{homebrew_cc}"
|
raise "The selected compiler doesn't support C++11: #{homebrew_cc}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def libcxx
|
def libcxx
|
||||||
append "HOMEBREW_CCCFG", "g", "" if compiler == :clang
|
append_to_cccfg "g" if compiler == :clang
|
||||||
end
|
end
|
||||||
|
|
||||||
def libstdcxx
|
def libstdcxx
|
||||||
append "HOMEBREW_CCCFG", "h", "" if compiler == :clang
|
append_to_cccfg "h" if compiler == :clang
|
||||||
end
|
end
|
||||||
|
|
||||||
# @private
|
# @private
|
||||||
def refurbish_args
|
def refurbish_args
|
||||||
append "HOMEBREW_CCCFG", "O", ""
|
append_to_cccfg "O"
|
||||||
end
|
end
|
||||||
|
|
||||||
%w[O3 O2 O1 O0 Os].each do |opt|
|
%w[O3 O2 O1 O0 Os].each do |opt|
|
||||||
|
|||||||
@ -139,6 +139,6 @@ module Superenv
|
|||||||
end
|
end
|
||||||
|
|
||||||
def no_weak_imports
|
def no_weak_imports
|
||||||
append "HOMEBREW_CCCFG", "w" if no_weak_imports_support?
|
append_to_cccfg "w" if no_weak_imports_support?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user