build: use *real* ninja build tool on alpine

This commit is contained in:
Marcus Holland-Moritz 2025-04-20 17:59:02 +02:00
parent 7f29c12316
commit 01bf972c41
2 changed files with 9 additions and 1 deletions

View File

@ -73,6 +73,10 @@ RUN bash /usr/local/bin/install-bloaty.sh
COPY install-static-libs.sh /usr/local/bin/install-static-libs.sh
RUN bash /usr/local/bin/install-static-libs.sh gcc clang-19 :alpine
# Install the *real* ninja...
# TODO: move this up if we change anything
RUN apk add --no-cache ninja-build
# Set up git & user
RUN git config --global --add safe.directory /workspace
RUN adduser -G users -s bash -u 1000 -D mhx

View File

@ -74,7 +74,11 @@ NINJA_LOG_FILE="${NINJA_LOG_DIR}/${BUILD_ARCH},${BUILD_DIST},${BUILD_TYPE}.log"
case "-$BUILD_TYPE-" in
*-ninja-*)
BUILD_TOOL=ninja
if [[ "$BUILD_DIST" == "alpine" ]]; then
BUILD_TOOL=/usr/lib/ninja-build/bin/ninja
else
BUILD_TOOL=ninja
fi
CMAKE_TOOL_ARGS="-GNinja"
mkdir -p "$NINJA_LOG_DIR"
SAVE_BUILD_LOG="cp -a .ninja_log $NINJA_LOG_FILE"