llvm: minimal fix for llvm_config method (#48501)

This commit is contained in:
Massimiliano Culpo 2025-01-10 11:36:07 +01:00 committed by GitHub
parent 7edb525599
commit 2e472a13e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1144,12 +1144,12 @@ def post_install(self):
with open(os.path.join(self.prefix.bin, cfg), "w") as f: with open(os.path.join(self.prefix.bin, cfg), "w") as f:
print(gcc_install_dir_flag, file=f) print(gcc_install_dir_flag, file=f)
def llvm_config(self, *args, **kwargs): def llvm_config(self, *args, result=None, **kwargs):
lc = Executable(self.prefix.bin.join("llvm-config")) lc = Executable(self.prefix.bin.join("llvm-config"))
if not kwargs.get("output"): if not kwargs.get("output"):
kwargs["output"] = str kwargs["output"] = str
ret = lc(*args, **kwargs) ret = lc(*args, **kwargs)
if kwargs.get("result") == "list": if result == "list":
return ret.split() return ret.split()
else: else:
return ret return ret