From 197e63465bc9d9e34ecf6ddd6dff270a05830926 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Mon, 25 Nov 2024 18:19:36 +0100 Subject: [PATCH] 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 --- build/jenkins/pipelines/nightly-build.Jenkinsfile | 2 +- build/premake/premake5.lua | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/build/jenkins/pipelines/nightly-build.Jenkinsfile b/build/jenkins/pipelines/nightly-build.Jenkinsfile index 6bcea26ee8..eb428553c9 100644 --- a/build/jenkins/pipelines/nightly-build.Jenkinsfile +++ b/build/jenkins/pipelines/nightly-build.Jenkinsfile @@ -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" } } diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index cbf694d15f..4d3fd1f00e 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -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