build: Fix LTO with Android NDK

`no-emulated-tls` is passed, but also link arguments are required for LTO.

Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31615>
This commit is contained in:
David Heidelberg
2024-10-13 01:49:58 -04:00
committed by Marge Bot
parent 8221367fba
commit 9ef6ff1702

View File

@@ -492,6 +492,7 @@ if with_platform_android and get_option('platform-sdk-version') >= 29
# ELF TLS, even when building targeting newer API levels. Make it actually do
# ELF TLS instead.
c_cpp_args += '-fno-emulated-tls'
add_project_link_arguments('-Wl,-plugin-opt=-emulated-tls=0', language: ['c', 'cpp'])
endif
# -mtls-dialect=gnu2 speeds up non-initial-exec TLS significantly but requires