Skip to content

Commit 163f406

Browse files
authored
don't emit debug symbols (#1985)
disable symbol generation for the generated project as it does not really give us anything this setting needs to be enabled in the user project that defines benchmarks it's required only for users who want to use disassembler with the option to print managed source code
1 parent a0035f9 commit 163f406

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/BenchmarkDotNet/Templates/CsProj.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
<OutputType>Exe</OutputType>
1212
<OutputPath>bin\$CONFIGURATIONNAME$</OutputPath>
1313
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
14-
<!-- nice to have for EtwProfiler, but not mandatory. On x86 and ARM disabled due to bug in Roslyn. -->
15-
<DebugType Condition=" '$(PlatformTarget)' != 'x86' And '$(PlatformTarget)' != 'ARM' ">pdbonly</DebugType>
16-
<DebugSymbols Condition=" '$(PlatformTarget)' != 'x86' And '$(PlatformTarget)' != 'ARM' ">true</DebugSymbols>
14+
<!-- disabled due to https://github.com/dotnet/roslyn/issues/59240 -->
15+
<DebugSymbols>false</DebugSymbols>
1716
<UseSharedCompilation>false</UseSharedCompilation>
1817
<CodeAnalysisRuleSet></CodeAnalysisRuleSet>
1918
<RunAnalyzers>false</RunAnalyzers>

src/BenchmarkDotNet/Toolchains/NativeAot/Generator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ private string GenerateProjectForNuGetBuild(BuildPartition buildPartition, Artif
128128
<AssemblyTitle>{artifactsPaths.ProgramName}</AssemblyTitle>
129129
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
130130
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
131-
<DebugType>pdbonly</DebugType>
132-
<DebugSymbols>true</DebugSymbols>
131+
<DebugSymbols>false</DebugSymbols>
133132
<UseSharedCompilation>false</UseSharedCompilation>
134133
<Deterministic>true</Deterministic>
134+
<RunAnalyzers>false</RunAnalyzers>
135135
{GetTrimmingSettings()}
136136
<IlcGenerateCompleteTypeMetadata>{ilcGenerateCompleteTypeMetadata}</IlcGenerateCompleteTypeMetadata>
137137
<IlcGenerateStackTraceData>{ilcGenerateStackTraceData}</IlcGenerateStackTraceData>
@@ -163,10 +163,10 @@ private string GenerateProjectForLocalBuild(BuildPartition buildPartition, Artif
163163
<AssemblyTitle>{artifactsPaths.ProgramName}</AssemblyTitle>
164164
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
165165
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
166-
<DebugType>pdbonly</DebugType>
167-
<DebugSymbols>true</DebugSymbols>
166+
<DebugSymbols>false</DebugSymbols>
168167
<UseSharedCompilation>false</UseSharedCompilation>
169168
<Deterministic>true</Deterministic>
169+
<RunAnalyzers>false</RunAnalyzers>
170170
{GetTrimmingSettings()}
171171
<IlcGenerateCompleteTypeMetadata>{ilcGenerateCompleteTypeMetadata}</IlcGenerateCompleteTypeMetadata>
172172
<IlcGenerateStackTraceData>{ilcGenerateStackTraceData}</IlcGenerateStackTraceData>

0 commit comments

Comments
 (0)