commit | 377328ae717fe869d5ffdadea56bbfcae8a8ba6b | [log] [tgz] |
---|---|---|
author | David 'Digit' Turner <digit@google.com> | Tue Apr 11 18:18:59 2023 +0200 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jan 17 14:11:36 2024 +0000 |
tree | 94b735d4d2a796881ec19fd4b5e5fcd34fc3cb97 | |
parent | f1332de6c1b15795a687f262f406832f65a910f2 [diff] |
Add misc/fuchsia/build-ninja.sh Add a developer script to rebuild Ninja from source locally, then run unit tests automatically. Note that it is possible to mimic the behavior of the LUCI recipe used to rebuild the Fuchsia Ninja prebuilt by using the following flags: misc/fuchsia/build-ninja.sh \ --fuchsia-dir=$FUCHSIA_DIR \ --build-mimalloc \ --install-to=/tmp/ninja Note that this script can be invoked from anywhere and can be used to rebuild a clean upstream checkout as well, since it does not depend on any other Fuchsia-specific content. Fuchsia-Only: Developer script Original-Change-Id: I5bc1141da4040c63346013bef3d02ad2dd554608 Original-Change-Id: I45d4964e7f7a78242280999d797df296a2cc2b27 Original-Change-Id: I396d33923c5d92508d3096e69ea2a4023da7cc6d Original-Change-Id: Ib9e0bc3ce9c3b4851266657056529e5de8f6773f Original-Change-Id: Ide29f9e6ffbddcf3039f431de60186bc1a7d1b4f Original-Change-Id: I39fca4bb4bc554b284a7b845f495adc0767f1aa6 Original-Change-Id: Ifea85956305c9b3763b61ede15de97ab2018f2ad Original-Change-Id: I66075beb4ff3486559b3db684a21201a6612a81d Original-Change-Id: I762cd7cff1989adeb3e1ae53e9119e82e4a50b3d Original-Change-Id: I525ad32c92bae52fd5157a04f797b33764c55386 Change-Id: I537f8b04406940e10d56456bd1589d6f03dcf660 Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/github.com/ninja-build/ninja/+/970033 Reviewed-by: Tyler Mandry <tmandry@google.com> Reviewed-by: David Fang <fangism@google.com> Commit-Queue: David Turner <digit@google.com> Fuchsia-Auto-Submit: David Turner <digit@google.com>
Ninja is a small build system with a focus on speed. https://ninja-build.org/
See the manual or doc/manual.asciidoc
included in the distribution for background and more details.
Binaries for Linux, Mac and Windows are available on GitHub. Run ./ninja -h
for Ninja help.
Installation is not necessary because the only required file is the resulting ninja binary. However, to enable features like Bash completion and Emacs and Vim editing modes, some files in misc/ must be copied to appropriate locations.
If you're interested in making changes to Ninja, read CONTRIBUTING.md first.
You can either build Ninja via the custom generator script written in Python or via CMake. For more details see the wiki.
./configure.py --bootstrap
This will generate the ninja
binary and a build.ninja
file you can now use to build Ninja with itself.
cmake -Bbuild-cmake cmake --build build-cmake
The ninja
binary will now be inside the build-cmake
directory (you can choose any other name you like).
To run the unit tests:
./build-cmake/ninja_test