7""" Parses manifest file and dumps it to json.
18 parser = argparse.ArgumentParser()
20 parser.add_argument(
'--input', dest=
'file_path', action=
'store', required=
True)
21 parser.add_argument(
'--clang-cpu', dest=
'clang_cpu', action=
'store', required=
True)
23 args = parser.parse_args()
25 with open(args.file_path)
as f:
29 target = args.clang_cpu +
'-fuchsia'
32 if target
in d[
'target']:
33 for runtime
in d[
'runtime']:
37 key = runtime[
'soname'] +
''.
join(d[
'cflags'])
38 md5 = hashlib.md5(key.encode()).hexdigest()
39 hash_key =
'md5_%s' % md5
42 output[hash_key] = os.path.dirname(runtime[
'dist'])
44 print(json.dumps(output))
49if __name__ ==
'__main__':
def print(*args, **kwargs)
static SkString join(const CommandLineFlags::StringArray &)