From afab416be48463b8829e47c6624af6f2629abefd Mon Sep 17 00:00:00 2001 From: David Heidelberg Date: Thu, 11 Apr 2024 00:13:25 +0200 Subject: [PATCH] ci: enable IPO/LTO only for nightly builds 1. nightly takes a long, the extra few minutes for linking don't matter 2. nightly will run faster, since where it's CPU dependent it's at least +5% perf 3. it may reveal some painful areas of common code or driver. 4. for some jobs (not enabled yet, it generates ugly errors, disable there Signed-off-by: David Heidelberg Signed-off-by: David Heidelberg Part-of: --- .gitlab-ci/build/gitlab-ci.yml | 1 - .gitlab-ci/meson/build.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/build/gitlab-ci.yml b/.gitlab-ci/build/gitlab-ci.yml index c436e76343e..5cf5f974546 100644 --- a/.gitlab-ci/build/gitlab-ci.yml +++ b/.gitlab-ci/build/gitlab-ci.yml @@ -340,7 +340,6 @@ fedora-release: -D glvnd=enabled -D platforms=x11,wayland EXTRA_OPTION: > - -D b_lto=true -D osmesa=true -D selinux=true -D tools=drm-shim,etnaviv,freedreno,glsl,intel,nir,nouveau,lima,panfrost,imagination diff --git a/.gitlab-ci/meson/build.sh b/.gitlab-ci/meson/build.sh index 33d1ad7236f..4fa8d205959 100755 --- a/.gitlab-ci/meson/build.sh +++ b/.gitlab-ci/meson/build.sh @@ -98,6 +98,31 @@ case $CI_JOB_NAME in ;; esac +# LTO handling +case $CI_PIPELINE_SOURCE in + schedule) + # run builds with LTO only for nightly + if [ "$CI_JOB_NAME" == "debian-ppc64el" ]; then + # /tmp/ccWlDCPV.s: Assembler messages: + # /tmp/ccWlDCPV.s:15250880: Error: operand out of range (0xfffffffffdd4e688 is not between 0xfffffffffe000000 and 0x1fffffc) + LTO=false + # enable one by one for now + elif [ "$CI_JOB_NAME" == "fedora-release" || "$CI_JOB_NAME" == "debian-build-testing" ]; then + LTO=true + else + LTO=false + fi + ;; + *) + # run Fedora with LTO in pre-merge for now + if [ "$CI_JOB_NAME" == "fedora-release" ]; then + LTO=true + else + LTO=false + fi + ;; +esac + section_switch meson-configure "meson: configure" rm -rf _build @@ -123,6 +148,7 @@ meson setup _build \ -D vulkan-drivers=${VULKAN_DRIVERS:-[]} \ -D video-codecs=all \ -D werror=true \ + -D b_lto=${LTO} \ ${EXTRA_OPTION} cd _build meson configure