From 601a99dcf50a88879c4ada692574dd2ce35fe21a Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 27 Aug 2021 11:13:56 +0200 Subject: Call MinGW's ld with -Bstatic when requesting static runtime linkage The -static argument we used before is supported by ld, but not lld. The latter requires --static or -Bstatic. Use -Bstatic, which is supported by both. Fixes: QTBUG-89549 Change-Id: I3c3069661bf4cd20e3298aff4714163b7419d3ef Reviewed-by: Alexandru Croitor (cherry picked from commit d94652f7927945f988f2c99cee98076efd5c1d79) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtPublicTargetHelpers.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/QtPublicTargetHelpers.cmake b/cmake/QtPublicTargetHelpers.cmake index 8471c45d05..571173e8aa 100644 --- a/cmake/QtPublicTargetHelpers.cmake +++ b/cmake/QtPublicTargetHelpers.cmake @@ -306,7 +306,7 @@ function(_qt_internal_set_up_static_runtime_library target) set_property(TARGET ${target} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") elseif(MINGW) - target_link_options(${target} INTERFACE "LINKER:-static") + target_link_options(${target} INTERFACE "LINKER:-Bstatic") endif() endif() endfunction() -- cgit v1.2.3