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 ccache prefix
22 s = str.split(obj["command"])
25 s[0] = s[0].split("/")[-1]
26 obj["command"] = " ".join(s)
28 json.dump(objects, sys.stdout, indent=2)