summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-08-27 11:13:56 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-08-27 15:45:25 +0200
commitd94652f7927945f988f2c99cee98076efd5c1d79 (patch)
treed6228d98666fc31fa1582bdd2783c3bd08f42b90 /cmake
parent7d4d47de7049ba52726071d4d2ba03fc014aa48d (diff)
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. Pick-to: 6.2 Fixes: QTBUG-89549 Change-Id: I3c3069661bf4cd20e3298aff4714163b7419d3ef Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtPublicTargetHelpers.cmake2
1 files changed, 1 insertions, 1 deletions
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$<$<CONFIG:Debug>:Debug>")
elseif(MINGW)
- target_link_options(${target} INTERFACE "LINKER:-static")
+ target_link_options(${target} INTERFACE "LINKER:-Bstatic")
endif()
endif()
endfunction()