Add renderer build options in build-packages.sh

This commit is contained in:
Francesco Abbate 2021-08-30 14:27:31 +02:00 committed by Francesco Abbate
parent 97ca19c73f
commit 8dde1dbb86
1 changed files with 11 additions and 4 deletions

View File

@ -42,7 +42,7 @@ lite_build () {
local build="$1" local build="$1"
build_dir_is_usable "$build" || exit 1 build_dir_is_usable "$build" || exit 1
rm -fr "$build" rm -fr "$build"
setup_options=() setup_options=("${@:2}")
if [[ "$OSTYPE" == "darwin"* ]]; then if [[ "$OSTYPE" == "darwin"* ]]; then
setup_options+=(-Dbundle=true) setup_options+=(-Dbundle=true)
fi fi
@ -55,7 +55,8 @@ lite_build_pgo () {
local build="$1" local build="$1"
build_dir_is_usable "$build" || exit 1 build_dir_is_usable "$build" || exit 1
rm -fr "$build" rm -fr "$build"
meson setup --buildtype=release -Db_pgo=generate "$build" || exit 1 echo meson setup --buildtype=release "${@:2}" -Db_pgo=generate "$build"
meson setup --buildtype=release "${@:2}" -Db_pgo=generate "$build" || exit 1
ninja -C "$build" || exit 1 ninja -C "$build" || exit 1
copy_directory_from_repo data "$build/src" copy_directory_from_repo data "$build/src"
"$build/src/lite-xl" "$build/src/lite-xl"
@ -200,9 +201,15 @@ lite_copy_third_party_modules () {
mv "$build/lite-colors-master/colors" "$build/third/data" mv "$build/lite-colors-master/colors" "$build/third/data"
rm -fr "$build/lite-colors-master" rm -fr "$build/lite-colors-master"
} }
build_opts=()
unset arch unset arch
while [ ! -z {$1+x} ]; do while [ ! -z {$1+x} ]; do
case $1 in case $1 in
-renderer)
build_opts+=("-Drenderer=true")
shift
;;
-pgo) -pgo)
pgo=true pgo=true
shift shift
@ -241,9 +248,9 @@ fi
build_dir=".build-$arch" build_dir=".build-$arch"
if [ -z ${pgo+set} ]; then if [ -z ${pgo+set} ]; then
lite_build "$build_dir" lite_build "$build_dir" "${build_opts[@]}"
else else
lite_build_pgo "$build_dir" lite_build_pgo "$build_dir" "${build_opts[@]}"
fi fi
lite_copy_third_party_modules "$build_dir" lite_copy_third_party_modules "$build_dir"
lite_build_package "$build_dir" "$arch" lite_build_package "$build_dir" "$arch"