Handle import statements in args.gn files
Did you know that args.gn files can have import statements and conditionals? I did not, but apparently some developers make use of both of these. Supporting import statements is not too hard, so this change adds this support. Supporting conditionals is possible, but risks turning autoninja into a turing complete language which is more than I think we want to do. This doesn't use the similar code in tools/mb/mb.py because that code is complex, and relies on the script location to find the src directory. This change also updates two of the existing test conditionals that were not quite sufficient - ninja/autoninja default to num-cores plus 2 so > cpu_count() is actually not sufficient to prove anything. Bug: 1482404 Change-Id: I0539d8068af59d11927cbdad260278a24ab912e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4864898 Reviewed-by: Takuto Ikuta <tikuta@chromium.org> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>changes/98/4864898/5
parent
272e6ab3cb
commit
30c1cba02f
Loading…
Reference in New Issue