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>
This commit is contained in:
parent
7d4d47de70
commit
d94652f792
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user