1
Fork 0

Regenerate JSON file for llvmint every time

This commit is contained in:
Guillaume Gomez 2022-05-15 14:48:52 +02:00
parent be960e1747
commit e25e2c3b94

View file

@ -116,12 +116,11 @@ def extract_instrinsics_from_llvmint(llvmint, intrinsics):
] ]
json_file = os.path.join(llvmint, "target/doc/llvmint.json") json_file = os.path.join(llvmint, "target/doc/llvmint.json")
if not os.path.exists(json_file): # We need to regenerate the documentation!
# We need to regenerate the documentation! run_command(
run_command( ["cargo", "rustdoc", "--", "-Zunstable-options", "--output-format", "json"],
["cargo", "rustdoc", "--", "-Zunstable-options", "--output-format", "json"], cwd=llvmint,
cwd=llvmint, )
)
with open(json_file, "r", encoding="utf8") as f: with open(json_file, "r", encoding="utf8") as f:
json_data = json.loads(f.read()) json_data = json.loads(f.read())
for p in json_data["paths"]: for p in json_data["paths"]: