development_tools: return llvm_clang Version class.
This was implemented before the rest of the file was refactored.
This commit is contained in:
parent
a3f03e2066
commit
28a00e9d6c
@ -85,12 +85,18 @@ class DevelopmentTools
|
|||||||
else
|
else
|
||||||
Version::NULL
|
Version::NULL
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def llvm_clang_build_version
|
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 = 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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user