Do setting b_lto=false
to meson enough to disable lto?
with the default makepkg.conf now enable lto by default.(pacman 6.0.2-9)
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge debug lto)
It look like the package still build with lto enable.
meson still passed -flto=auto to compiler and lto1 is still ran.
Changing CFLAGS, CXXFLAGS, and RUSTFLAGS before building seem to fix it.
diff --git a/PKGBUILD b/PKGBUILD
index 6dfeb20..b395178 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -118,6 +118,27 @@ prepare() {
}
build () {
+ remove_lto () {
+ local flags_tmp i
+ mapfile -t flags_tmp < <(printf '%s\n' $1)
+ i=0
+ for flag in "${flags_tmp[@]}"
+ do
+ if [[ "${flag}" = *'-flto='* ]]
+ then
+ unset 'flags_tmp[i]'
+ if [ "${flags_tmp[$((i-1))]}" = "-C" ]
+ then
+ unset "flags_tmp[$((i-1))]"
+ fi
+ fi
+ ((++i))
+ done
+ echo "${flags_tmp[*]}"
+ }
+ export CFLAGS=$(remove_lto "$CFLAGS")
+ export CXXFLAGS=$(remove_lto "$CXXFLAGS")
+ export RUSTFLAGS=$(remove_lto "$RUSTFLAGS")
meson setup mesa _build \
-D b_ndebug=true \
-D b_lto=false \
Pinned Comments
Lone_Wolf commented on 2024-09-10 19:58 (UTC)
removed obsolete options, build now works again.
building opencl clover is disabled for now, see https://gitlab.freedesktop.org/mesa/mesa/-/issues/11863
Those that need opencl should use rusticl instead. Note that rusticl at runtime is disabled by default, see https://docs.mesa3d.org/envvars.html#rusticl-environment-variables for info about enabling it.
Lone_Wolf commented on 2020-04-23 12:26 (UTC) (edited on 2023-03-30 07:04 (UTC) by Lone_Wolf)
Mesa and llvm are closely tied together. Everytime the llvm mesa is built against changes/updates , mesa needs to be rebuilt.
I expect anyone building mesa-git against one of the llvm trunk variants to be able to do that themselves, but atleast some of the people that built against repo llvm don't understand how to deal with such a rebuild.
The rest of this post is meant for those people.
Option A - best one
see https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_clean_chroot for the official way or https://aur.archlinux.org/packages/clean-chroot-manager for an alternative method.
Option B - 2nd best
Lone_Wolf commented on 2019-07-09 13:43 (UTC) (edited on 2023-04-18 10:41 (UTC) by Lone_Wolf)
WARNING : aur helpers don't support this method at all. They check .SRCINFO and that doesn't include this variable so it will use the default which is hardcoded to build against repo llvm.
Why would I want to use llvm development versions ?
Lone_Wolf commented on 2018-01-30 14:06 (UTC) (edited on 2023-02-12 11:56 (UTC) by Lone_Wolf)
run pacman Syu update non-repo packages for llvm if you use them
build mesa-git, log out , update mesa-git and restart X .
run
glxinfo -B
to verify basic OpenGL functionalitybuild lib32-mesa-git
run
glxinfo32 -B
to verify basic OpenGL functionality for multilib programs