Commit Graph

7 Commits

Author SHA1 Message Date
Michael Pratt
ac483e1c2a tools/ninja: update to 1.12.1
Update to the most recent stable release,
including a new job scheduler and bug fixes.

Backport a patch to assist in reworking jobserver support.

The original patch for jobserver support requires reworking
due to the function CanRunMore() and its usage
being significantly changed, including the return
becoming an integer instead of a boolean.

AcquireToken() must now be used in CanRunMore()
in order to quantify how much the job searching loop
is able to run at any time, and in order to do so
CanRunMore() cannot be a constant function anymore.

Added:
 - 010-backport-gtest.patch

Manually Adjust:
 - 100-make_jobserver_support.patch

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16693
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-14 13:58:44 +02:00
Michael Pratt
df303c7ef4 tools/ninja: use existing ninja to build ninja
Add methods to skip the building and execution of Ninja by python
in order to allow Make to execute Ninja after the configure script.

This allows the user to build Ninja only once
if they already have an older version of Ninja built.

It also allows the user to test the jobserver functionality
by having Ninja built twice (clean then compile).

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16693
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-14 13:58:44 +02:00
Michael Pratt
3efedda1da tools/ninja: cleanup Makefile
Use default CXXFLAGS and LDFLAGS variables.

Directly add --verbose flag without a variable.

Split up lines for script arguments.

Delete unnecessary lines.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16693
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-14 13:58:44 +02:00
Nick Hainke
58a8ad3801 tools/ninja: update to 1.11.1
Release Notes:
https://github.com/ninja-build/ninja/releases/tag/v1.11.1

Sync the "100-make_jobserver_support.patch" with the PR:
https://github.com/ninja-build/ninja/pull/1140

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-01-24 23:13:25 +01:00
Rosen Penev
a7be143646 tools/ninja: update to 1.11.0
Updated patchset to latest.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-06-13 19:50:25 +02:00
Felix Fietkau
fa0aea53b2 tools: build ninja before ccache to fix the build order
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-12 14:33:57 +02:00
Felix Fietkau
97258f5363 build: add ninja build tool and make it available for cmake
ninja is faster at building cmake packages than make, and according to reports
also more reliable at handling parallel builds
This commit includes a patch that adds GNU make jobserver support, in order to
allow more precise control over the number of parallel tasks

Enable parallel build by default for packages using ninja

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-12 10:46:39 +02:00