shared: handle missing Xcode/CLT version.

Fixes https://github.com/Homebrew/homebrew-core/issues/3973.
This commit is contained in:
Mike McQuaid 2016-08-17 13:23:13 +01:00
parent 6878577d12
commit 27fc2abaca

View File

@ -1,6 +1,15 @@
module SharedEnvExtension
def no_weak_imports?
return false unless compiler == :clang
MacOS::Xcode.version >= "8.0" || MacOS::CLT.version >= "8.0"
if MacOS::Xcode.version && MacOS::Xcode.version < "8.0"
return false
end
if MacOS::CLT.version && MacOS::CLT.version < "8.0"
return false
end
true
end
end