os/mac/xcode: improve CLT clang version detection.

This commit is contained in:
Mike McQuaid 2019-12-11 13:49:56 +00:00
parent 8d3e7cf028
commit 2d5f6dd79f
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -280,6 +280,10 @@ module OS
version_output[/clang-(\d+\.\d+\.\d+(\.\d+)?)/, 1]
end
def detect_version_from_clang_version
detect_clang_version&.sub(/^(\d+)00\./, "\\1.")
end
# Version string (a pretty long one) of the CLT package.
# Note, that different ways to install the CLTs lead to different
# version numbers.
@ -300,7 +304,7 @@ module OS
return version if version
end
detect_clang_version
detect_version_from_clang_version
end
end
end