Always enable --large-address-aware build option

This option is needed to be able to use more than 2GB on 32bit Windows
builds.

Having to explicitly enable this turns out to be a pitfall. Release
builds are done with this option enabled and when then building from
source and running out of memory it's not immediately obvious what the
reason is.

The documented intent is that this behaviour might be useful to find
memory leaks. The large-address-aware enabled build already perfectly
serves this role this days and the memory pressure is an important
reason for the ongoing Windows 64bit build efforts. Also there are
arguably better tools for this purpose.

Refs: commit a8403bd7e5
Refs: issue #1619
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser
2024-11-25 18:19:36 +01:00
parent 06f47f0f46
commit 197e63465b
2 changed files with 3 additions and 7 deletions
@@ -68,7 +68,7 @@ pipeline {
bat "cd libraries && get-windows-libs.bat"
bat "(robocopy E:\\wxWidgets-3.2.6\\lib libraries\\win32\\wxwidgets\\lib /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
bat "(robocopy E:\\wxWidgets-3.2.6\\include libraries\\win32\\wxwidgets\\include /MIR /NDL /NJH /NJS /NP /NS /NC) ^& IF %ERRORLEVEL% LEQ 1 exit 0"
bat "cd build\\workspaces && update-workspaces.bat --atlas --without-pch --large-address-aware --without-tests"
bat "cd build\\workspaces && update-workspaces.bat --atlas --without-pch --without-tests"
}
}
+2 -6
View File
@@ -25,9 +25,6 @@ newoption { trigger = "prefer-local-libs", description = "Prefer locally built l
newoption { trigger = "macosx-version-min", description = "Set minimum required version of the OS X API, the build will possibly fail if an older SDK is used, while newer API functions will be weakly linked (i.e. resolved at runtime)" }
newoption { trigger = "sysroot", description = "Set compiler system root path, used for building against a non-system SDK. For example /usr/local becomes SYSROOT/user/local" }
-- Windows specific options
newoption { trigger = "large-address-aware", description = "Make the executable large address aware. Do not use for development, in order to spot memory issues easily" }
-- Install options
newoption { trigger = "bindir", description = "Directory for executables (typically '/usr/games'); default is to be relocatable" }
newoption { trigger = "datadir", description = "Directory for data files (typically '/usr/share/games/0ad'); default is ../data/ relative to executable" }
@@ -1066,9 +1063,8 @@ function setup_main_exe ()
links { "delayimp" }
-- allow the executable to use more than 2GB of RAM.
-- this should not be enabled during development, so that memory issues are easily spotted.
if _OPTIONS["large-address-aware"] then
if arch == "x86" then
-- allow the executable to use more than 2GB of RAM.
linkoptions { "/LARGEADDRESSAWARE" }
end