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 12 matching lines...) Expand all Loading... |
23 | 23 |
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, 'testing', 'gmock.gyp'), | 34 os.path.join(V8_BASE, 'testing', 'gmock.gyp'), |
34 os.path.join(V8_BASE, 'testing', 'gtest.gyp'), | 35 os.path.join(V8_BASE, 'testing', 'gtest.gyp'), |
35 os.path.join(V8_BASE, 'tools', 'parser-shell.gyp'), | 36 os.path.join(V8_BASE, 'tools', 'parser-shell.gyp'), |
36 ] | 37 ] |
37 | 38 |
38 ALL_GYP_PREFIXES = [ | 39 ALL_GYP_PREFIXES = [ |
39 '..', | 40 '..', |
40 'common', | 41 'common', |
41 os.path.join('src', 'third_party', 'vtune'), | 42 os.path.join('src', 'third_party', 'vtune'), |
42 'src', | 43 'src', |
43 'samples', | 44 'samples', |
44 'testing', | 45 'testing', |
45 'tools', | 46 'tools', |
46 os.path.join('test', 'cctest'), | 47 os.path.join('test', 'cctest'), |
47 os.path.join('test', 'common'), | 48 os.path.join('test', 'common'), |
48 os.path.join('test', 'fuzzer'), | 49 os.path.join('test', 'fuzzer'), |
49 os.path.join('test', 'unittests'), | 50 os.path.join('test', 'unittests'), |
| 51 os.path.join('test', 'inspector'), |
50 ] | 52 ] |
51 | 53 |
52 GYP_UNSUPPORTED_FEATURES = [ | 54 GYP_UNSUPPORTED_FEATURES = [ |
53 'gcmole', | 55 'gcmole', |
54 ] | 56 ] |
55 | 57 |
56 GN_FILES = [ | 58 GN_FILES = [ |
57 os.path.join(V8_BASE, 'BUILD.gn'), | 59 os.path.join(V8_BASE, 'BUILD.gn'), |
58 os.path.join(V8_BASE, 'build', 'secondary', 'testing', 'gmock', 'BUILD.gn'), | 60 os.path.join(V8_BASE, 'build', 'secondary', 'testing', 'gmock', 'BUILD.gn'), |
59 os.path.join(V8_BASE, 'build', 'secondary', 'testing', 'gtest', 'BUILD.gn'), | 61 os.path.join(V8_BASE, 'build', 'secondary', 'testing', 'gtest', 'BUILD.gn'), |
60 os.path.join(V8_BASE, 'src', 'inspector', 'BUILD.gn'), | 62 os.path.join(V8_BASE, 'src', 'inspector', 'BUILD.gn'), |
61 os.path.join(V8_BASE, 'test', 'cctest', 'BUILD.gn'), | 63 os.path.join(V8_BASE, 'test', 'cctest', 'BUILD.gn'), |
62 os.path.join(V8_BASE, 'test', 'unittests', 'BUILD.gn'), | 64 os.path.join(V8_BASE, 'test', 'unittests', 'BUILD.gn'), |
| 65 os.path.join(V8_BASE, 'test', 'inspector', 'BUILD.gn'), |
63 os.path.join(V8_BASE, 'tools', 'BUILD.gn'), | 66 os.path.join(V8_BASE, 'tools', 'BUILD.gn'), |
64 ] | 67 ] |
65 | 68 |
66 GN_UNSUPPORTED_FEATURES = [ | 69 GN_UNSUPPORTED_FEATURES = [ |
67 'aix', | 70 'aix', |
68 'cygwin', | 71 'cygwin', |
69 'freebsd', | 72 'freebsd', |
70 'gcmole', | 73 'gcmole', |
71 'openbsd', | 74 'openbsd', |
72 'ppc', | 75 'ppc', |
73 'qnx', | 76 'qnx', |
74 'solaris', | 77 'solaris', |
75 'vtune', | 78 'vtune', |
76 'x87', | 79 'x87', |
77 ] | 80 ] |
78 | 81 |
79 ALL_GN_PREFIXES = [ | 82 ALL_GN_PREFIXES = [ |
80 '..', | 83 '..', |
81 os.path.join('src', 'inspector'), | 84 os.path.join('src', 'inspector'), |
82 'src', | 85 'src', |
83 'testing', | 86 'testing', |
84 os.path.join('test', 'cctest'), | 87 os.path.join('test', 'cctest'), |
85 os.path.join('test', 'unittests'), | 88 os.path.join('test', 'unittests'), |
| 89 os.path.join('test', 'inspector'), |
86 ] | 90 ] |
87 | 91 |
88 def pathsplit(path): | 92 def pathsplit(path): |
89 return re.split('[/\\\\]', path) | 93 return re.split('[/\\\\]', path) |
90 | 94 |
91 def path_no_prefix(path, prefixes): | 95 def path_no_prefix(path, prefixes): |
92 for prefix in prefixes: | 96 for prefix in prefixes: |
93 if path.startswith(prefix + os.sep): | 97 if path.startswith(prefix + os.sep): |
94 return path_no_prefix(path[len(prefix) + 1:], prefixes) | 98 return path_no_prefix(path[len(prefix) + 1:], prefixes) |
95 return path | 99 return path |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 for i in missing_gyp_files(): | 172 for i in missing_gyp_files(): |
169 print i | 173 print i |
170 | 174 |
171 print "\n----------- Files not in gn: -------------" | 175 print "\n----------- Files not in gn: -------------" |
172 for i in missing_gn_files(): | 176 for i in missing_gn_files(): |
173 print i | 177 print i |
174 return 0 | 178 return 0 |
175 | 179 |
176 if '__main__' == __name__: | 180 if '__main__' == __name__: |
177 sys.exit(main()) | 181 sys.exit(main()) |
OLD | NEW |