OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 the V8 project authors. All rights reserved. | 2 # Copyright 2015 the V8 project authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """ | 6 """ |
7 Script to print potentially missing source dependencies based on the actual | 7 Script to print potentially missing source dependencies based on the actual |
8 .h and .cc files in the source tree and which files are included in the gyp | 8 .h and .cc files in the source tree and which files are included in the gyp |
9 and gn files. The latter inclusion is overapproximated. | 9 and gn files. The latter inclusion is overapproximated. |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 GYP_FILES = [ | 24 GYP_FILES = [ |
25 os.path.join(V8_BASE, 'src', 'd8.gyp'), | 25 os.path.join(V8_BASE, 'src', 'd8.gyp'), |
26 os.path.join(V8_BASE, 'src', 'v8.gyp'), | 26 os.path.join(V8_BASE, 'src', 'v8.gyp'), |
27 os.path.join(V8_BASE, 'src', 'inspector', 'inspector.gypi'), | 27 os.path.join(V8_BASE, 'src', 'inspector', 'inspector.gypi'), |
28 os.path.join(V8_BASE, 'src', 'third_party', 'vtune', 'v8vtune.gyp'), | 28 os.path.join(V8_BASE, 'src', 'third_party', 'vtune', 'v8vtune.gyp'), |
29 os.path.join(V8_BASE, 'samples', 'samples.gyp'), | 29 os.path.join(V8_BASE, 'samples', 'samples.gyp'), |
30 os.path.join(V8_BASE, 'test', 'cctest', 'cctest.gyp'), | 30 os.path.join(V8_BASE, 'test', 'cctest', 'cctest.gyp'), |
31 os.path.join(V8_BASE, 'test', 'fuzzer', 'fuzzer.gyp'), | 31 os.path.join(V8_BASE, 'test', 'fuzzer', 'fuzzer.gyp'), |
32 os.path.join(V8_BASE, 'test', 'unittests', 'unittests.gyp'), | 32 os.path.join(V8_BASE, 'test', 'unittests', 'unittests.gyp'), |
33 os.path.join(V8_BASE, 'test', 'inspector', 'inspector.gyp'), | 33 os.path.join(V8_BASE, 'test', 'inspector', 'inspector.gyp'), |
34 os.path.join(V8_BASE, 'test', 'mkgrokdump', 'mkgrokdump.gyp'), | |
35 os.path.join(V8_BASE, 'testing', 'gmock.gyp'), | 34 os.path.join(V8_BASE, 'testing', 'gmock.gyp'), |
36 os.path.join(V8_BASE, 'testing', 'gtest.gyp'), | 35 os.path.join(V8_BASE, 'testing', 'gtest.gyp'), |
37 os.path.join(V8_BASE, 'tools', 'parser-shell.gyp'), | 36 os.path.join(V8_BASE, 'tools', 'parser-shell.gyp'), |
38 ] | 37 ] |
39 | 38 |
40 ALL_GYP_PREFIXES = [ | 39 ALL_GYP_PREFIXES = [ |
41 '..', | 40 '..', |
42 'common', | 41 'common', |
43 os.path.join('src', 'third_party', 'vtune'), | 42 os.path.join('src', 'third_party', 'vtune'), |
44 'src', | 43 'src', |
45 'samples', | 44 'samples', |
46 'testing', | 45 'testing', |
47 'tools', | 46 'tools', |
48 os.path.join('test', 'cctest'), | 47 os.path.join('test', 'cctest'), |
49 os.path.join('test', 'common'), | 48 os.path.join('test', 'common'), |
50 os.path.join('test', 'fuzzer'), | 49 os.path.join('test', 'fuzzer'), |
51 os.path.join('test', 'unittests'), | 50 os.path.join('test', 'unittests'), |
52 os.path.join('test', 'inspector'), | 51 os.path.join('test', 'inspector'), |
53 os.path.join('test', 'mkgrokdump'), | |
54 ] | 52 ] |
55 | 53 |
56 GYP_UNSUPPORTED_FEATURES = [ | 54 GYP_UNSUPPORTED_FEATURES = [ |
57 'gcmole', | 55 'gcmole', |
58 'setup-isolate-deserialize.cc', | 56 'setup-isolate-deserialize.cc', |
59 ] | 57 ] |
60 | 58 |
61 GN_FILES = [ | 59 GN_FILES = [ |
62 os.path.join(V8_BASE, 'BUILD.gn'), | 60 os.path.join(V8_BASE, 'BUILD.gn'), |
63 os.path.join(V8_BASE, 'build', 'secondary', 'testing', 'gmock', 'BUILD.gn'), | 61 os.path.join(V8_BASE, 'build', 'secondary', 'testing', 'gmock', 'BUILD.gn'), |
64 os.path.join(V8_BASE, 'build', 'secondary', 'testing', 'gtest', 'BUILD.gn'), | 62 os.path.join(V8_BASE, 'build', 'secondary', 'testing', 'gtest', 'BUILD.gn'), |
65 os.path.join(V8_BASE, 'src', 'inspector', 'BUILD.gn'), | 63 os.path.join(V8_BASE, 'src', 'inspector', 'BUILD.gn'), |
66 os.path.join(V8_BASE, 'test', 'cctest', 'BUILD.gn'), | 64 os.path.join(V8_BASE, 'test', 'cctest', 'BUILD.gn'), |
67 os.path.join(V8_BASE, 'test', 'unittests', 'BUILD.gn'), | 65 os.path.join(V8_BASE, 'test', 'unittests', 'BUILD.gn'), |
68 os.path.join(V8_BASE, 'test', 'inspector', 'BUILD.gn'), | 66 os.path.join(V8_BASE, 'test', 'inspector', 'BUILD.gn'), |
69 os.path.join(V8_BASE, 'test', 'mkgrokdump', 'BUILD.gn'), | |
70 os.path.join(V8_BASE, 'tools', 'BUILD.gn'), | 67 os.path.join(V8_BASE, 'tools', 'BUILD.gn'), |
71 ] | 68 ] |
72 | 69 |
73 GN_UNSUPPORTED_FEATURES = [ | 70 GN_UNSUPPORTED_FEATURES = [ |
74 'aix', | 71 'aix', |
75 'cygwin', | 72 'cygwin', |
76 'freebsd', | 73 'freebsd', |
77 'gcmole', | 74 'gcmole', |
78 'openbsd', | 75 'openbsd', |
79 'ppc', | 76 'ppc', |
80 'qnx', | 77 'qnx', |
81 'solaris', | 78 'solaris', |
82 'vtune', | 79 'vtune', |
83 'x87', | 80 'x87', |
84 ] | 81 ] |
85 | 82 |
86 ALL_GN_PREFIXES = [ | 83 ALL_GN_PREFIXES = [ |
87 '..', | 84 '..', |
88 os.path.join('src', 'inspector'), | 85 os.path.join('src', 'inspector'), |
89 'src', | 86 'src', |
90 'testing', | 87 'testing', |
91 os.path.join('test', 'cctest'), | 88 os.path.join('test', 'cctest'), |
92 os.path.join('test', 'unittests'), | 89 os.path.join('test', 'unittests'), |
93 os.path.join('test', 'inspector'), | 90 os.path.join('test', 'inspector'), |
94 os.path.join('test', 'mkgrokdump'), | |
95 ] | 91 ] |
96 | 92 |
97 def pathsplit(path): | 93 def pathsplit(path): |
98 return re.split('[/\\\\]', path) | 94 return re.split('[/\\\\]', path) |
99 | 95 |
100 def path_no_prefix(path, prefixes): | 96 def path_no_prefix(path, prefixes): |
101 for prefix in prefixes: | 97 for prefix in prefixes: |
102 if path.startswith(prefix + os.sep): | 98 if path.startswith(prefix + os.sep): |
103 return path_no_prefix(path[len(prefix) + 1:], prefixes) | 99 return path_no_prefix(path[len(prefix) + 1:], prefixes) |
104 return path | 100 return path |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 for i in missing_gyp_files(): | 173 for i in missing_gyp_files(): |
178 print i | 174 print i |
179 | 175 |
180 print "\n----------- Files not in gn: -------------" | 176 print "\n----------- Files not in gn: -------------" |
181 for i in missing_gn_files(): | 177 for i in missing_gn_files(): |
182 print i | 178 print i |
183 return 0 | 179 return 0 |
184 | 180 |
185 if '__main__' == __name__: | 181 if '__main__' == __name__: |
186 sys.exit(main()) | 182 sys.exit(main()) |
OLD | NEW |