From f32a38b6c6fa192bf7fc980968fc43b6eca011f4 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 6 Aug 2020 14:33:14 +0200 Subject: 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 64c111e10fcb2f69855432177d76649b6b789fac Task-number: QTBUG-85911 Change-Id: Id73bf967a7aeb0e0cbccfaafe056b325c8711f82 Reviewed-by: Qt CI Bot Reviewed-by: Cristian Adam --- cmake/QtInternalTargets.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index c7da00c3f4..ced23b9d6a 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -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() -- cgit v1.2.3