Skip to content

Commit 49d5fec

Browse files
okiasFireBurn
authored andcommitted
build: Fix LTO with Android NDK
`no-emulated-tls` is passed, but also link arguments are required for LTO. Signed-off-by: David Heidelberg <[email protected]>
1 parent d14d3c5 commit 49d5fec

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ if with_platform_android and get_option('platform-sdk-version') >= 29
492492
# ELF TLS, even when building targeting newer API levels. Make it actually do
493493
# ELF TLS instead.
494494
c_cpp_args += '-fno-emulated-tls'
495+
add_project_link_arguments('-Wl,-plugin-opt=-emulated-tls=0', language: ['c', 'cpp'])
495496
endif
496497

497498
# -mtls-dialect=gnu2 speeds up non-initial-exec TLS significantly but requires

0 commit comments

Comments
 (0)