14INCLUDE_DIRECTIVE_RE = re.compile(
r'^#include "(.*)"')
16PLATFORM_LAYER_RE = re.compile(
r'^runtime/platform/')
17VM_LAYER_RE = re.compile(
r'^runtime/(vm|lib)/')
18BIN_LAYER_RE = re.compile(
r'^runtime/bin/')
22 'runtime/bin/run_vm_tests.cc',
23 'runtime/bin/ffi_unit_test/run_ffi_unit_tests.cc',
24 'runtime/vm/libfuzzer/dart_libfuzzer.cc'
30 with open(os.path.join(sdk_root, path), encoding=
'utf-8')
as file:
32 m = INCLUDE_DIRECTIVE_RE.match(line)
34 header = os.path.join(
'runtime', m.group(1))
35 if os.path.isfile(os.path.join(sdk_root, header)):
39 for include
in includes:
40 if PLATFORM_LAYER_RE.match(path):
41 if VM_LAYER_RE.match(include):
43 'LAYERING ERROR: %s must not include %s' % (path, include))
44 elif BIN_LAYER_RE.match(include):
46 'LAYERING ERROR: %s must not include %s' % (path, include))
47 elif VM_LAYER_RE.match(path):
48 if BIN_LAYER_RE.match(include):
50 'LAYERING ERROR: %s must not include %s' % (path, include))
51 elif BIN_LAYER_RE.match(path):
52 if VM_LAYER_RE.match(include):
54 'LAYERING ERROR: %s must not include %s' % (path, include))
60 for file
in os.listdir(dir):
61 path = os.path.join(dir, file)
62 if os.path.isdir(path):
64 elif path.endswith(
'test.cc')
or path
in EXTRA_TEST_FILES:
66 elif path.endswith(
'.cc')
or path.endswith(
'.h'):
67 errors +=
CheckFile(sdk_root, os.path.relpath(path, sdk_root))
75if __name__ ==
'__main__':
def CheckFile(sdk_root, path)
def CheckDir(sdk_root, dir)
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
def print(*args, **kwargs)
static SkString join(const CommandLineFlags::StringArray &)