Bring back pgo option in new build package script
This commit is contained in:
parent
38d85f2483
commit
f69e42a43c
|
@ -25,6 +25,8 @@ show_help() {
|
||||||
echo "-f --forcefallback Force to build subprojects dependencies statically."
|
echo "-f --forcefallback Force to build subprojects dependencies statically."
|
||||||
echo "-B --bundle Create an App bundle (macOS only)"
|
echo "-B --bundle Create an App bundle (macOS only)"
|
||||||
echo "-P --portable Create a portable package."
|
echo "-P --portable Create a portable package."
|
||||||
|
echo "-O --pgo Use profile guided optimizations (pgo)."
|
||||||
|
echo " Requires running the application iteractively."
|
||||||
echo
|
echo
|
||||||
echo "Package options:"
|
echo "Package options:"
|
||||||
echo
|
echo
|
||||||
|
@ -55,6 +57,7 @@ main() {
|
||||||
local bundle
|
local bundle
|
||||||
local innosetup
|
local innosetup
|
||||||
local portable
|
local portable
|
||||||
|
local pgo
|
||||||
|
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
case $i in
|
case $i in
|
||||||
|
@ -110,6 +113,10 @@ main() {
|
||||||
source="--source"
|
source="--source"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-O|--pgo)
|
||||||
|
pgo="--pgo"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--debug)
|
--debug)
|
||||||
debug="--debug"
|
debug="--debug"
|
||||||
set -x
|
set -x
|
||||||
|
@ -137,7 +144,8 @@ main() {
|
||||||
$debug \
|
$debug \
|
||||||
$force_fallback \
|
$force_fallback \
|
||||||
$bundle \
|
$bundle \
|
||||||
$portable
|
$portable \
|
||||||
|
$pgo
|
||||||
|
|
||||||
source scripts/package.sh \
|
source scripts/package.sh \
|
||||||
${build_dir_option[@]} \
|
${build_dir_option[@]} \
|
||||||
|
|
|
@ -21,6 +21,7 @@ show_help() {
|
||||||
echo "-p --prefix PREFIX Install directory prefix. Default: '/'."
|
echo "-p --prefix PREFIX Install directory prefix. Default: '/'."
|
||||||
echo "-B --bundle Create an App bundle (macOS only)"
|
echo "-B --bundle Create an App bundle (macOS only)"
|
||||||
echo "-P --portable Create a portable binary package."
|
echo "-P --portable Create a portable binary package."
|
||||||
|
echo "-O --pgo Use profile guided optimizations (pgo)."
|
||||||
echo " macOS: disabled when used with --bundle,"
|
echo " macOS: disabled when used with --bundle,"
|
||||||
echo " Windows: Implicit being the only option."
|
echo " Windows: Implicit being the only option."
|
||||||
echo
|
echo
|
||||||
|
@ -33,6 +34,7 @@ main() {
|
||||||
local force_fallback
|
local force_fallback
|
||||||
local bundle
|
local bundle
|
||||||
local portable
|
local portable
|
||||||
|
local pgo
|
||||||
|
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
case $i in
|
case $i in
|
||||||
|
@ -70,6 +72,10 @@ main() {
|
||||||
portable="-Dportable=true"
|
portable="-Dportable=true"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-O|--pgo)
|
||||||
|
pgo="-Db_pgo=generate"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# unknown option
|
# unknown option
|
||||||
;;
|
;;
|
||||||
|
@ -94,9 +100,18 @@ main() {
|
||||||
$force_fallback \
|
$force_fallback \
|
||||||
$bundle \
|
$bundle \
|
||||||
$portable \
|
$portable \
|
||||||
|
$pgo \
|
||||||
"${build_dir}"
|
"${build_dir}"
|
||||||
|
|
||||||
meson compile -C "${build_dir}"
|
meson compile -C "${build_dir}"
|
||||||
|
|
||||||
|
if [ ! -z ${pgo+x} ]; then
|
||||||
|
cp -r data "${build_dir}/src"
|
||||||
|
"${build_dir}/src/lite-xl"
|
||||||
|
meson configure -Db_pgo=use "${build_dir}"
|
||||||
|
meson compile -C "${build_dir}"
|
||||||
|
rm -fr "${build_dir}/data"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|
Loading…
Reference in New Issue