summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorYuhang Zhao <2546789017@qq.com>2021-11-19 10:55:27 +0800
committerYuhang Zhao <2546789017@qq.com>2021-11-26 16:42:53 +0800
commit405adf3348b6d5ffb87f02550743050e4f0da4a6 (patch)
tree89fe09e6357e547d2418d6a8d09a48a8b4552095 /cmake
parent77de4a9bb4e15d19bd3f87f03f4b2d06a68277b5 (diff)
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>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtInternalTargets.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake
index a6c77d10cb..7a0d8cd1b7 100644
--- a/cmake/QtInternalTargets.cmake
+++ b/cmake/QtInternalTargets.cmake
@@ -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()