Flutter Engine
The Flutter Engine
merge_deps_sources.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2
3"""Merges sources of a Dart target and its dependencies"""
4
5# Copyright 2013 The Flutter Authors. All rights reserved.
6# Use of this source code is governed by a BSD-style license that can be
7# found in the LICENSE file.
8
9import argparse
10import json
11import os
12import sys
13
14
15def main():
16 parser = argparse.ArgumentParser(
17 'Merges sources of a Dart target and its dependencies', fromfile_prefix_chars='@'
18 )
19 parser.add_argument(
20 '--output', help='Path to output the final list', type=argparse.FileType('w'), required=True
21 )
22 parser.add_argument(
23 '--depfile',
24 help='Path to the depfile to generate',
25 type=argparse.FileType('w'),
26 required=True
27 )
28 parser.add_argument(
29 '--sources',
30 help='Sources of this target',
31 nargs='*',
32 )
33 parser.add_argument('--source_lists', help='Files containing lists of Dart sources', nargs='*')
34 args = parser.parse_args()
35
36 args.depfile.write('{}: {}\n'.format(args.output.name, ' '.join(args.source_lists)))
37
38 # Merges sources of this target, and all of its dependencies.
39 all_sources = set(args.sources)
40 for f in args.source_lists:
41 with open(f, 'r') as f:
42 all_sources.update(json.load(f))
43 json.dump(sorted(all_sources), args.output)
44
45
46if __name__ == '__main__':
47 sys.exit(main())
uint32_t uint32_t * format
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set
Definition: switches.h:76
Definition: main.py:1
static SkString join(const CommandLineFlags::StringArray &)
Definition: skpbench.cpp:741