Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/coreclr/tools/aot/AotCompilerCommon.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<Project>
<PropertyGroup>
<ServerGarbageCollection>true</ServerGarbageCollection>
<!-- crossgen2/ilc run as the build host architecture when cross-building (CrossHostArch),
otherwise as TargetArchitecture. This is the architecture of the compiler process itself. -->
<_AotCompilerHostArch Condition="'$(CrossHostArch)' != ''">$(CrossHostArch)</_AotCompilerHostArch>
<_AotCompilerHostArch Condition="'$(CrossHostArch)' == ''">$(TargetArchitecture)</_AotCompilerHostArch>

<!-- Server GC reserves per-heap address-space segments up front. On a 32-bit host the ~2 GB
user-mode address space is largely consumed by those reservations, so compiling a very
large method can fail to allocate the contiguous output image buffer and crash with
OutOfMemory. Use Workstation GC on 32-bit hosts. See https://github.com/dotnet/runtime/issues/128531. -->
<ServerGarbageCollection Condition="'$(ServerGarbageCollection)' == '' and '$(_AotCompilerHostArch)' != 'x86' and '$(_AotCompilerHostArch)' != 'arm' and '$(_AotCompilerHostArch)' != 'armel'">true</ServerGarbageCollection>
<ServerGarbageCollection Condition="'$(ServerGarbageCollection)' == ''">false</ServerGarbageCollection>
<TieredCompilation>false</TieredCompilation>
<EventSourceSupport>true</EventSourceSupport>
<OptimizationPreference>Speed</OptimizationPreference>
Expand Down
Loading