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