Android: Use lld as default linker for Qt Modules

We can't use the gold linker with the android NDK, which is the default
option. Using the gold linker results in linker crashes. QMake builds
also disables the gold linker.

Change-Id: I73de93150b160b4411715007bc7e40238b96d400
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
bb10
Leander Beernaert 2019-06-04 14:09:13 +02:00 committed by Simon Hausmann
parent 624891e7c5
commit 64c111e10f
1 changed files with 6 additions and 0 deletions

View File

@ -1240,6 +1240,12 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
if(NOT ${arg_DISABLE_TOOLS_EXPORT})
qt_export_tools(${target})
endif()
# We can't use the gold linker on android with the NDK, which is the default
# linker. To build our own target we will use the lld linker.
if (ANDROID)
target_link_options("${target}" PRIVATE -fuse-ld=lld)
endif()
endfunction()
function(qt_export_tools module_name)