Display run commands when using llvm-tblgen

This commit is contained in:
Guillaume Gomez 2023-08-11 15:40:36 +02:00
parent 033dc1f208
commit d929cf8ef1

View File

@ -46,10 +46,10 @@ def convert_to_string(content):
def extract_instrinsics_from_llvm(llvm_path, intrinsics): def extract_instrinsics_from_llvm(llvm_path, intrinsics):
p = subprocess.Popen( command = ["llvm-tblgen", "llvm/IR/Intrinsics.td"]
["llvm-tblgen", "llvm/IR/Intrinsics.td"], cwd = os.path.join(llvm_path, "llvm/include")
cwd=os.path.join(llvm_path, "llvm/include"), print("=> Running command `{}` from `{}`".format(command, cwd))
stdout=subprocess.PIPE) p = subprocess.Popen(command, cwd=cwd, stdout=subprocess.PIPE)
output, err = p.communicate() output, err = p.communicate()
lines = convert_to_string(output).splitlines() lines = convert_to_string(output).splitlines()
pos = 0 pos = 0