Skip to content

Commit 822533b

Browse files
authored
Set Optimize in ILLink analyzer project (#98727)
1 parent 67a52a1 commit 822533b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tools/illink/src/ILLink.RoslynAnalyzer/ILLink.RoslynAnalyzer.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
@@ -9,6 +9,12 @@
99
<AnalysisLevel>Latest</AnalysisLevel>
1010
<NoWarn Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(NoWarn);CS8524</NoWarn>
1111
<AnalyzerLanguage>cs</AnalyzerLanguage>
12+
<!-- The analyzer needs to process deeply nested expressions in corelib.
13+
This can blow up the stack if using unoptimized code (due to large
14+
stack frames with many temporary locals for debugging support), so we
15+
optimize the analyzer even in Debug builds. Note: we still use the
16+
Debug configuration to get Debug asserts. -->
17+
<Optimize>true</Optimize>
1218
</PropertyGroup>
1319

1420
<ItemGroup>

0 commit comments

Comments
 (0)