Win32: Enable large address aware explicitly
Large address aware is enabled by default in 64-bit compilers, but not 32-bit compilers. But Qt users may build 32-bit Qt themself, in this case large address aware is disabled in fact, and it may cause some issues. So we pass /LARGEADDRESSAWARE to the linker unconditionally to make sure large address aware is enabled for both 32-bit and 64-bit builds. Microsoft Docs: https://docs.microsoft.com/en-us/cpp/build/reference/largeaddressaware-handle-large-addresses?view=msvc-170 Change-Id: Idb2603d9ba0ba9ef4477ce1c3174b7c7e8ba76f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>bb10
parent
77de4a9bb4
commit
405adf3348
|
|
@ -203,7 +203,7 @@ if (MSVC)
|
|||
)
|
||||
|
||||
target_link_options(PlatformCommonInternal INTERFACE
|
||||
-DYNAMICBASE -NXCOMPAT
|
||||
-DYNAMICBASE -NXCOMPAT -LARGEADDRESSAWARE
|
||||
$<$<NOT:$<CONFIG:Debug>>:-OPT:REF -OPT:ICF -GUARD:CF>
|
||||
)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -343,6 +343,8 @@ msvc {
|
|||
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -guard:cf
|
||||
QMAKE_LFLAGS_RELEASE += /GUARD:CF
|
||||
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += /GUARD:CF
|
||||
|
||||
QMAKE_LFLAGS += /LARGEADDRESSAWARE
|
||||
}
|
||||
|
||||
win32 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue