Ensure consistent flags for ASM language and MODULE targets
By not including ASM in the languages for which compiler flags are adjusted, we can end up with inconsistent optimization and debug settings between different languages. Make sure they are treated the same. Similarly, linker flags for MODULE target types should also have their debugging and incremental linking flags adjusted, just like EXE and SHARED targets. When building with MSVC, MODULE targets were having the relevant flags stripped, but not then replaced with the desired ones, leaving them empty in typical scenarios. This would primarily affect plugins, which are built as MODULE rather than SHARED libraries. Fixes: QTBUG-90237 Change-Id: I648ea74be1654d24cbecc592ce0ca4b59b2ae839 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
parent
7c69eb8868
commit
ecc2a28cab
@ -347,7 +347,7 @@ endfunction()
|
||||
function(qt_internal_get_enabled_languages_for_flag_manipulation out_var)
|
||||
# Limit flag modification to c-like code. We don't want to accidentally add incompatible
|
||||
# flags to MSVC's RC or Swift.
|
||||
set(languages_to_process C CXX OBJC OBJCXX)
|
||||
set(languages_to_process ASM C CXX OBJC OBJCXX)
|
||||
get_property(globally_enabled_languages GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||
set(enabled_languages "")
|
||||
foreach(lang ${languages_to_process})
|
||||
@ -855,7 +855,7 @@ function(qt_internal_set_up_config_optimizations_like_in_qmake)
|
||||
qt_internal_add_linker_flags(
|
||||
FLAGS "${flag_value}"
|
||||
CONFIGS RELEASE RELWITHDEBINFO MINSIZEREL
|
||||
TYPES EXE SHARED # when linking static libraries, link.exe can't recognize this parameter, clang-cl will error out.
|
||||
TYPES EXE SHARED MODULE # when linking static libraries, link.exe can't recognize this parameter, clang-cl will error out.
|
||||
IN_CACHE)
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user