The `ninja.py` script fails for this invocation:
```
ninja -C C:\Code\f\engine\src\out\host_debug_unopt\
flutter_windows_unittests.exe
```
However, this works as expected:
```
ninja.exe -C C:\Code\f\engine\src\out\host_debug_unopt\
flutter_windows_unittests.exe
```
Notice how there are extra spaces between the DIR and target. This bug breaks the Flutter engine's build integration with Visual Studio after `ninja.exe` was removed from depot_tools.
Here is an example MSBuild target that runs into this issue:
```xml
<Target Name="Build">
<Exec Command="call ninja -C $(OutDir) flutter_windows_unittests.exe" />
</Target>
```
Change-Id: Ib0022bc48151de438ac209fd07e0183872538ac6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4215121
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Loïc Sharma <loicsharma@google.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
At present when looking for ninja, main only searches in two locations, gclient root and src. The Electron project lists Chromium’s src as a dependency in its DEPS file, so Ninja won’t be in the primary solution’s path (as it’s a transitive dependency, not a direct dependency of Chromium). This change adapts existing logic to account for that case.
Change-Id: I35aea29135d5968722a308bfb6dbb8a727550b42
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4203207
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
ninja.bat can't pass '^' for single file compile.
This change fixes ninja.bat to apply double quotas to args to preserve "^".
Note that ninja.bat still needs "^^" since single "^" is already removed as an escape character.
This is the same implementation with autoninja.{bat, py}.
Test: http://go/paste/6182226814304256
Bug: 1340825
Change-Id: I183c7890634a77471a617c4cc2b9c8c33bc8487d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4060603
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
In Skia (for example), GetPrimarySolutionPath works, but FindGclientRoot
does not (users tend not to use gclient to sync DEPS, etc).
Without this change, we'd get to the loop. If a user had pulled ninja to
third_party/ninja/ninja, then it would work just fine. If they hadn't,
python would throw an exception on the os.path.join line, because we'd
be passing a NoneType as the first argument.
Bug: chromium:1340825
Change-Id: Iab86450c5b6f00bc9c2716b9504debc9a56d9bb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4034942
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>