1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 02:07:35 +00:00

Ladybird/Android: Move host build into its own shell script

This lets us select a proper host compiler version if cc/cxx are not
suitable for building Lagom.
This commit is contained in:
Andrew Kaster 2023-09-07 08:46:15 -06:00 committed by Andrew Kaster
parent bd7d01e975
commit 920dc1ba53
2 changed files with 37 additions and 6 deletions

View file

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -eo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
SERENITY_ROOT="$(realpath "${DIR}"/../..)"
# shellcheck source=/dev/null
. "${SERENITY_ROOT}/Meta/shell_include.sh"
# shellcheck source=/dev/null
. "${SERENITY_ROOT}/Meta/find_compiler.sh"
pick_host_compiler
BUILD_DIR=${BUILD_DIR:-"${SERENITY_ROOT}/Build"}
CACHE_DIR=${CACHE_DIR:-"${BUILD_DIR}/caches"}
cmake -S "$SERENITY_ROOT/Meta/Lagom" -B "$BUILD_DIR/lagom-tools" \
-GNinja -Dpackage=LagomTools \
-DCMAKE_INSTALL_PREFIX="$BUILD_DIR/lagom-tools-install" \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_CXX_COMPILER="$CXX" \
-DSERENITY_CACHE_DIR="$CACHE_DIR"
ninja -C "$BUILD_DIR/lagom-tools" install