6 objects = json.load(sys.stdin)
8 for i in range(len(objects) - 1, -1, -1):
11 # Remove everything except .c files
12 if not obj["file"].endswith(".c"):
16 # remove duplicates introduced my multiarch
17 if "CLIB_MARCH_VARIANT" in obj["command"]:
21 # remove if there is no command
22 if obj["command"] == "":
26 # remove ccache prefix
27 s = str.split(obj["command"])
30 s[0] = s[0].split("/")[-1]
31 obj["command"] = " ".join(s)
33 json.dump(objects, sys.stdout, indent=2)