0

Move windows specific doc about ninja ^ syntax

Bug: b/336185923
Change-Id: I1564e7a607927284bb6e07c51dd1bcd88a16e5b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5471602
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Junji Watanabe <jwata@google.com>
Cr-Commit-Position: refs/heads/main@{#1290534}
This commit is contained in:
Junji Watanabe
2024-04-22 08:15:34 +00:00
committed by Chromium LUCI CQ
parent 650ce4565b
commit db7caa6a84
2 changed files with 17 additions and 4 deletions

@ -366,10 +366,6 @@ compiles `obj/base/base/logging.o`.
In addition to `foo.cc^`, Siso also supports `foo.h^` syntax to compile
the corresponding `foo.o` if it exists.
*** note
On Windows, `autoninja` requires `^^` to preserve training `^`.
***
## Run Chromium
Once it is built, you can simply run the browser:

@ -399,6 +399,23 @@ You can get a list of all of the other build targets from GN by running
the GN label with no preceding "//" (so for `//chrome/test:unit_tests`
use `autoninja -C out\Default chrome/test:unit_tests`).
## Compile a single file
Ninja supports a special [syntax `^`][ninja hat syntax] to compile a single object file specyfing
the source file. For example, `ninja -C out/Default ../../base/logging.cc^`
compiles `obj/base/base/logging.o`.
[ninja hat syntax]: https://ninja-build.org/manual.html#:~:text=There%20is%20also%20a%20special%20syntax%20target%5E%20for%20specifying%20a%20target%20as%20the%20first%20output%20of%20some%20rule%20containing%20the%20source%20you%20put%20in%20the%20command%20line%2C%20if%20one%20exists.%20For%20example%2C%20if%20you%20specify%20target%20as%20foo.c%5E%20then%20foo.o%20will%20get%20built%20(assuming%20you%20have%20those%20targets%20in%20your%20build%20files)
With autoninja, you need to add `^^` to preserve the trailing `^`.
```shell
$ autoninja -C out\Default ..\..\base\logging.cc^^
```
In addition to `foo.cc^^`, Siso also supports `foo.h^^` syntax to compile
the corresponding `foo.o` if it exists.
## Run Chromium
Once it is built, you can simply run the browser: