Commit Graph

7 Commits (main)

Author SHA1 Message Date
Junji Watanabe 2b1aa8dcab Add single file compile support for Windows in ninja wrappers
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>
2 years ago
Nico Weber c768fd8fc9 Revert "Use depot_tools python3 to call ninja.py"
This reverts commit 8e77bba1ae.

Reason for revert: Very likely caused https://crbug.com/1399811

Original change's description:
> Use depot_tools python3 to call ninja.py
>
> This guarantees the python version used to call ninja.py.
>
> Bug: 1398687
> Change-Id: Ife58b285bb621dddb20b947010bc19818cd41395
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4091206
> Commit-Queue: Junji Watanabe <jwata@google.com>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Auto-Submit: Junji Watanabe <jwata@google.com>
> Commit-Queue: Nico Weber <thakis@chromium.org>

Bug: 1398687
Change-Id: I9bf469cf19134f58b3bbb44d4efa1959fe37b93f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4092694
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2 years ago
Junji Watanabe 8e77bba1ae Use depot_tools python3 to call ninja.py
This guarantees the python version used to call ninja.py.

Bug: 1398687
Change-Id: Ife58b285bb621dddb20b947010bc19818cd41395
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4091206
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Nico Weber <thakis@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Nico Weber <thakis@chromium.org>
2 years ago
Junji Watanabe 1f67d5573f Add ninja wrappers to trigger DEPS ninja
This is the first step to deprecate ninja binaries in depot_tools.

depot_tools/{ninja, ninja.bat} will call ninja.py, which finds CIPD ninja under src/third_party in the current gclient source tree. https://crrev.com/c/3869740

If it fails to find, it does fallback to an existing ninja binary in depot_tools, until removing the references to the legacy ninja binaries.

# For those who see the deprecation message,
You need to install ninja using DEPS at your project. (https://crrev.com/c/3869740 is an example.)

If your project doesn't have DEPS, you need to install ninja and include it in PATH manually. e.g. sudo apt install ninja-build

Test:
Linux builder: https://ci.chromium.org/swarming/task/5e9cfc917aa3f110?server=chromium-swarm.appspot.com
Windows builder: https://ci.chromium.org/swarming/task/5e9d48885c460b10?server=chromium-swarm.appspot.com

Bug: 1340825
Change-Id: I70d1863d72ddfa65b87a62c9bde8ff63f7641d13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3925341
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
2 years ago
scottmg@chromium.org 319f78501f ninja.bat wrapper no longer required, update ninja binaries.
Update ninja binary with upstream:
- $in_newline instead of $in
- Improved build log format for faster loading.
Review URL: https://chromiumcodereview.appspot.com/10399040

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143525 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
scottmg@chromium.org 0ef1b2aacc Don't set up environment for ninja if the compiler is already available
Previously when ninja.bat was run from a prompt that already had VS vars
available, it was adding them a second time. Depending on what else the user
had in the path, this could cause the path to become too long and so things at
the end wouldn't be found. To avoid this, check if the compiler is available
first, and don't run the environment set up in that case.

R=maruel@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10222010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@133940 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
scottmg@chromium.org a90bc037fc Wrap ninja invocation to include python in path, and set up compiler environment before invoking the ninja binary itself (which is moved to a subdirectory).
Review URL: https://chromiumcodereview.appspot.com/9967020

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@132239 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago