https://bugs.documentfoundation.org/show_bug.cgi?id=167950

--- Comment #2 from Bashar Al Halabi <[email protected]> ---
Root cause, confirmed on 26.8.1.1 and still present on master (commit
6e8329f204dd, 2026-10-15).

configure.ac, Android toolchain section (line 902 at 26.8.1.1, line 924 on
master):

    if test "$ENABLE_LTO" = TRUE; then
        ANDROIDCFLAGS="$ANDROIDCFLAGS -flto -fuse-linker-plugin -O2"

-fuse-linker-plugin is a GCC option. The NDK ships only clang, which reports
that it ignores it. Every configure check that compiles with -Werror then
fails, and the first such check is the C++20 test. From config.log (NDK r28c,
Linux host):

    checking whether clang++ supports C++20
    clang++ -target aarch64-linux-android26 ... -flto -fuse-linker-plugin -O2
-stdlib=libc++ -c -std=c++20 -Werror conftest.cpp
    clang++: error: optimization flag '-fuse-linker-plugin' is not supported
[-Werror,-Wignored-optimization-argument]
    configure: error: no

NDK 28.2.13676358 on a macOS host gives the same result.
solenv/gbuild/platform/com_GCC_defs.mk already uses -flto=thin for clang
(gb_CLANG_LTOFLAGS), so dropping -fuse-linker-plugin from the Android CFLAGS
(or using -flto=thin there as well) looks like the fix.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to