Skip to content

Commit

Permalink
Add jobserver support branch
Browse files Browse the repository at this point in the history
Ninja has a PR for adding make jobserver support [1] that has been a widely
debated PR for many... many years.  Given that many people have forked to
incorporate this PR, and it claims to solve a problem we have (OOM on gcc
processes) it seems like it would be worthwhile using a well maintained fork
instead of the main project.

This is not a one way door.  If we find that the project goes
unmaintained, doesn't build, or otherwise has problems, we can always go
back to using mainline.

Of the forks that have pulled this in, there are:
The Fuscia project [2]
Their targets seem more specific and less generic, although their
improvements seem more extensive.

Kitware [3]
Maintains a fork of ninja

Docker [4]

[1] ninja-build/ninja#1139
[2] https://fuchsia.googlesource.com/third_party/github.com/ninja-build/ninja/+/refs/heads/main/README.fuchsia
[3] https://github.com/Kitware/ninja
[4] https://github.com/dockbuild/ninja-jobserver

'''
EXTRA_OEMESON_COMPILE:append = " \
--ninja-args='--tokenpool-master=fifo' \
"

PARALLEL_MAKE = "-j 20"
BB_NUMBER_THREADS = "20"
'''

Signed-off-by: Ed Tanous <[email protected]>
  • Loading branch information
edtanous committed May 8, 2024
1 parent 9e05d53 commit d961605
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion poky/meta/classes-recipe/meson.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ do_configure[postfuncs] += "meson_do_qa_configure"

do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+"
meson_do_compile() {
meson compile -v ${PARALLEL_MAKE} ${MESON_TARGET}
meson compile -v ${PARALLEL_MAKE} ${EXTRA_OEMESON_COMPILE} ${MESON_TARGET}
}

meson_do_install() {
Expand Down
5 changes: 3 additions & 2 deletions poky/meta/recipes-devtools/ninja/ninja_1.11.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a81586a64ad4e476c791cda7e2f2c52e"

DEPENDS = "re2c-native ninja-native"

SRCREV = "a524bf3f6bacd1b4ad85d719eed2737d8562f27a"
SRCREV = "c9e21dbbc4c746ba397c0f9bec5f65c99f783c08"

SRC_URI = "git://github.com/ninja-build/ninja.git;branch=release;protocol=https"
# https://github.com/ninja-build/ninja/issues/1139
SRC_URI = "git://github.com/ninja-build/ninja.git;branch=kitware-staged-features;protocol=https;nobranch=1"
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"

S = "${WORKDIR}/git"
Expand Down

0 comments on commit d961605

Please sign in to comment.