aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2019-02-20 14:45:29 +0100
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-05-03 01:39:09 +0200
commite0f19cf5204784c374f0a04926d2b3aa728480ed (patch)
tree5cc5c2b5d645fe854daa7a98caefc0eb48cd9468
parent529d3788ab70785e12735d4aa9a3cf9e64023bc9 (diff)
downloadmeson-e0f19cf5204784c374f0a04926d2b3aa728480ed.zip
meson-e0f19cf5204784c374f0a04926d2b3aa728480ed.tar.gz
meson-e0f19cf5204784c374f0a04926d2b3aa728480ed.tar.bz2
LLVM dependency refactoring
-rw-r--r--mesonbuild/dependencies/dev.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index 5ee85bf..2a89606 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -192,7 +192,7 @@ class GMockDependency(ExternalDependency):
return [DependencyMethods.PKGCONFIG, DependencyMethods.SYSTEM]
-class LLVMDependency(ConfigToolDependency):
+class LLVMDependencyConfigTool(ConfigToolDependency):
"""
LLVM uses a special tool, llvm-config, which has arguments for getting
c args, cxx args, and ldargs as well as version.
@@ -399,6 +399,23 @@ class LLVMDependency(ConfigToolDependency):
return 'modules: ' + ', '.join(self.module_details)
return ''
+class LLVMDependency(ExternalDependency):
+ def __init__(self, env, kwargs):
+ super().__init__('LLVM', env, 'cpp', kwargs)
+
+ @classmethod
+ def _factory(cls, env, kwargs):
+ methods = cls._process_method_kw(kwargs)
+ candidates = []
+
+ if DependencyMethods.CONFIG_TOOL in methods:
+ candidates.append(functools.partial(LLVMDependencyConfigTool, env, kwargs))
+
+ return candidates
+
+ @staticmethod
+ def get_methods():
+ return [DependencyMethods.CONFIG_TOOL]
class ValgrindDependency(PkgConfigDependency):
'''