no_weak_imports: always check for support
ENV.no_weak_imports should be a no-op when Xcode doesn't support the feature to avoid breaking builds with <= Xcode 7.
This commit is contained in:
parent
299dffd903
commit
390bcf413b
@ -1,5 +1,5 @@
|
||||
module SharedEnvExtension
|
||||
def no_weak_import_support?
|
||||
def no_weak_imports_support?
|
||||
return false unless compiler == :clang
|
||||
|
||||
if MacOS::Xcode.version && MacOS::Xcode.version < "8.0"
|
||||
|
@ -143,6 +143,6 @@ module Stdenv
|
||||
end
|
||||
|
||||
def no_weak_imports
|
||||
append "LDFLAGS", "-Wl,-no_weak_imports"
|
||||
append "LDFLAGS", "-Wl,-no_weak_imports" if no_weak_imports_support?
|
||||
end
|
||||
end
|
||||
|
@ -113,7 +113,7 @@ module Superenv
|
||||
end
|
||||
|
||||
def no_weak_imports
|
||||
append "HOMEBREW_CCCFG", "w"
|
||||
append "HOMEBREW_CCCFG", "w" if no_weak_imports_support?
|
||||
end
|
||||
|
||||
# These methods are no longer necessary under superenv, but are needed to
|
||||
|
Loading…
x
Reference in New Issue
Block a user