Skip to content
Snippets Groups Projects
Commit 28a00e9d authored by Mike McQuaid's avatar Mike McQuaid
Browse files

development_tools: return llvm_clang Version class.

This was implemented before the rest of the file was refactored.
parent a3f03e20
No related branches found
No related tags found
No related merge requests found
......@@ -85,12 +85,18 @@ class DevelopmentTools
else
Version::NULL
end
end
end
def llvm_clang_build_version
@llvm_clang_build_version ||= if Tab.for_name "llvm"
@llvm_clang_build_version ||= begin
path = Formulary.factory("llvm").opt_prefix/"bin/clang"
`#{path} --version`[/clang version (\d\.\d\.\d)/, 1]
if path.executable? &&
build_version = `#{path} --version`[/clang version (\d\.\d\.\d)/, 1]
Version.new build_version
else
Version::NULL
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment