Since people weren't enthused about moving the .gn file to the toplevel in D56419, here's a script to make gn at least somewhat more pleasant to invoke (useful for gn clean, gn args --list, gn desc, etc).
Details
Details
Diff Detail
Diff Detail
Event Timeline
llvm/utils/gn/gn.py | ||
---|---|---|
25 | Shouldn't we check if help is the first argument (i.e. argv[1])? Otherwise this would catch even cases like gn gen help (which is admittedly a strange name for output directory but nevertheless valid). |
Comment Actions
address comment
llvm/utils/gn/gn.py | ||
---|---|---|
25 | I think either check will have false positives (e.g. gn --nocolor help gen doesn't work when checking argv[1]). It's not _that_ much code to get the first non-flag arg, so I did that. |
Comment Actions
LGTM, although I'll probably try to fix the gn help behavior to avoid similar workarounds.
Shouldn't we check if help is the first argument (i.e. argv[1])? Otherwise this would catch even cases like gn gen help (which is admittedly a strange name for output directory but nevertheless valid).