[PATCH] D56565: gn build: Add gn.py wrapper script that adds appropriate --dotfile= and --root= paramers

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 11 20:41:10 PST 2019


phosek added inline comments.


================
Comment at: llvm/utils/gn/gn.py:25
+    extra_args = []
+    if 'help' not in sys.argv:  # `gn help` gets confused by the switches.
+        cwd = os.getcwd()
----------------
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).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56565/new/

https://reviews.llvm.org/D56565





More information about the llvm-commits mailing list