CMake: Don't use lld linker for Android with a Windows host

Most of the time lld just gets stuck (deadlock) waiting on some
mutex, thus failing integrations.

Amends 64c111e10f

Task-number: QTBUG-85911
Change-Id: Id73bf967a7aeb0e0cbccfaafe056b325c8711f82
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
bb10
Alexandru Croitor 2020-08-06 14:33:14 +02:00
parent d50a7d635c
commit f32a38b6c6
1 changed files with 4 additions and 1 deletions

View File

@ -106,7 +106,10 @@ 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)
# TODO: Why not?
# Linking Android libs with lld on Windows sometimes deadlocks. Don't use lld on
# Windows. qmake doesn't use lld to build Android on any host platform.
if (ANDROID AND NOT CMAKE_HOST_WIN32)
target_link_options(PlatformModuleInternal INTERFACE -fuse-ld=lld)
endif()