LLVM dependency refactoring

pull/5185/head
Daniel Mensinger 6 years ago
parent 529d3788ab
commit e0f19cf520
No known key found for this signature in database
GPG Key ID: 54DD94C131E277D4
  1. 19
      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):
'''

Loading…
Cancel
Save