mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
Meta: Read MAKEJOBS to limit jobs for ninja in serenity.sh
The default behavior of using all cores will still apply if no MAKEJOBS variable is supplied.
This commit is contained in:
parent
7036f8c89c
commit
3192cabc0e
Notes:
sideshowbarker
2024-07-17 21:16:31 +09:00
Author: https://github.com/davidot
Commit: 3192cabc0e
Pull-request: https://github.com/SerenityOS/serenity/pull/12815
Reviewed-by: https://github.com/ADKaster
2 changed files with 9 additions and 2 deletions
|
@ -218,12 +218,16 @@ build_target() {
|
|||
# invoked superbuild for serenity target that doesn't set -DBUILD_LAGOM=ON
|
||||
cmake -S "$SERENITY_SOURCE_DIR/Meta/Lagom" -B "$BUILD_DIR" -DBUILD_LAGOM=ON
|
||||
fi
|
||||
|
||||
# Get either the environement MAKEJOBS or all processors via CMake
|
||||
[ -z "$MAKEJOBS" ] && MAKEJOBS=$(cmake -P "$SERENITY_SOURCE_DIR/Meta/CMake/processor-count.cmake")
|
||||
|
||||
# With zero args, we are doing a standard "build"
|
||||
# With multiple args, we are doing an install/image/run
|
||||
if [ $# -eq 0 ]; then
|
||||
cmake --build "$SUPER_BUILD_DIR"
|
||||
CMAKE_BUILD_PARALLEL_LEVEL="$MAKEJOBS" cmake --build "$SUPER_BUILD_DIR"
|
||||
else
|
||||
ninja -C "$BUILD_DIR" -- "$@"
|
||||
ninja -j "$MAKEJOBS" -C "$BUILD_DIR" -- "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue