llvm: add llvm_config helper (#28670)
Add a helper as a base to build better libs etc. methods
This commit is contained in:
parent
bff5d253cf
commit
545a429646
1 changed files with 9 additions and 0 deletions
|
@ -714,6 +714,15 @@ def post_install(self):
|
|||
with working_dir(self.build_directory):
|
||||
install_tree("bin", join_path(self.prefix, "libexec", "llvm"))
|
||||
|
||||
def llvm_config(self, *args, **kwargs):
|
||||
lc = Executable(self.prefix.bin.join('llvm-config'))
|
||||
if not kwargs.get('output'):
|
||||
kwargs['output'] = str
|
||||
ret = lc(*args, **kwargs)
|
||||
if kwargs.get('output') == "list":
|
||||
return ret.split()
|
||||
return ret
|
||||
|
||||
|
||||
def get_llvm_targets_to_build(spec):
|
||||
targets = spec.variants['targets'].value
|
||||
|
|
Loading…
Reference in a new issue