Merge pull request #10804 from Bo98/llvm_clang-version-fix

development_tools: fix LLVM Clang 10+ version detection
This commit is contained in:
Bo Anderson 2021-03-08 13:12:30 +00:00 committed by GitHub
commit 34a8c0fafa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,7 @@ class DevelopmentTools
@llvm_clang_build_version ||= begin
path = Formulary.factory("llvm").opt_prefix/"bin/clang"
if path.executable? &&
(build_version = `#{path} --version`[/clang version (\d\.\d\.\d)/, 1])
(build_version = `#{path} --version`[/clang version (\d+\.\d\.\d)/, 1])
Version.new build_version
else
Version::NULL