|
Enhance GN diagnostic tools
Unifies the existing desc, refs, and check commands to take an output directory rather than creating a build in out/Default. This matches the other commands.
Separates out the label pattern matching code from the visibility component into a separate object so it can be used in commands to match more than one label. Adds support for toolchains in these patterns (this wasn't so necessary for visibility, but is more useful for these other commands). The old pattern code is now used only for the sources filter. This patch moves the documentation for that directly on the sources assignment filter help.
Enhances "gn check" to take a label or label pattern of targets to check. This is especially necessary now with so many errors, one can focus on one small part of the codebase.
Enhances "gn refs" to work like "gn desc deps" but in reverse. It can print reverse dependency trees, or find all targets that depend on a given target or targets. For example, "find everything that depends on anything in //mojo". It lost the ability to find configs or unresolved dependencies. We could potentially add these back, but they're complicated to implement and less useful.
Adds a "gn ls" command to list targets.
BUG= 343726
Committed: https://crrev.com/3741b720dc56fc8de8a32502ce73783db0feedda
Cr-Commit-Position: refs/heads/master@{#292658}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1021 lines, -459 lines) |
Patch |
 |
M |
tools/gn/BUILD.gn
|
View
|
1
|
3 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tools/gn/command_check.cc
|
View
|
1
2
3
4
|
2 chunks |
+62 lines, -7 lines |
0 comments
|
Download
|
 |
M |
tools/gn/command_desc.cc
|
View
|
1
|
3 chunks |
+22 lines, -10 lines |
0 comments
|
Download
|
 |
M |
tools/gn/command_help.cc
|
View
|
1
2
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
A |
tools/gn/command_ls.cc
|
View
|
1
2
|
1 chunk |
+121 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tools/gn/command_refs.cc
|
View
|
1
2
|
4 chunks |
+236 lines, -71 lines |
0 comments
|
Download
|
 |
M |
tools/gn/commands.h
|
View
|
1
|
3 chunks |
+34 lines, -6 lines |
0 comments
|
Download
|
 |
M |
tools/gn/commands.cc
|
View
|
1
|
4 chunks |
+43 lines, -13 lines |
0 comments
|
Download
|
 |
M |
tools/gn/functions.cc
|
View
|
1
2
|
2 chunks |
+38 lines, -4 lines |
0 comments
|
Download
|
 |
M |
tools/gn/gn.gyp
|
View
|
1
|
3 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tools/gn/header_checker.h
|
View
|
|
3 chunks |
+14 lines, -7 lines |
0 comments
|
Download
|
 |
M |
tools/gn/header_checker.cc
|
View
|
|
4 chunks |
+26 lines, -13 lines |
0 comments
|
Download
|
 |
A |
tools/gn/label_pattern.h
|
View
|
1
2
|
1 chunk |
+72 lines, -0 lines |
0 comments
|
Download
|
 |
A |
tools/gn/label_pattern.cc
|
View
|
1
2
3
|
1 chunk |
+247 lines, -0 lines |
0 comments
|
Download
|
 |
A |
tools/gn/label_pattern_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+73 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tools/gn/pattern.h
|
View
|
1
2
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tools/gn/pattern.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -34 lines |
0 comments
|
Download
|
 |
M |
tools/gn/setup.cc
|
View
|
|
2 chunks |
+5 lines, -13 lines |
0 comments
|
Download
|
 |
M |
tools/gn/variables.cc
|
View
|
1
2
|
1 chunk |
+6 lines, -18 lines |
0 comments
|
Download
|
 |
M |
tools/gn/visibility.h
|
View
|
|
4 chunks |
+2 lines, -38 lines |
0 comments
|
Download
|
 |
M |
tools/gn/visibility.cc
|
View
|
|
6 chunks |
+8 lines, -164 lines |
0 comments
|
Download
|
 |
M |
tools/gn/visibility_unittest.cc
|
View
|
|
1 chunk |
+0 lines, -55 lines |
0 comments
|
Download
|
Total messages: 8 (0 generated)
|