Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private void ProcessInputFileList(
// an input to the ReadyToRunCompiler task
TaskItem r2rCompilationEntry = new(file);
r2rCompilationEntry.SetMetadata(MetadataKeys.OutputR2RImage, outputR2RImage);
if (outputPDBImage != null && ReadyToRunUseCrossgen2 && !_crossgen2IsVersion5)
if (outputPDBImage != null && ReadyToRunUseCrossgen2 && !_crossgen2IsVersion5 && EmitSymbols)
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition on line 213 is now inconsistent with the composite image path on line 310, which does not include the EmitSymbols check in its condition. Both code paths handle the same scenario (setting EmitSymbols metadata for crossgen2), but line 310's condition is if (compositePDBImage != null && ReadyToRunUseCrossgen2 && !_crossgen2IsVersion5). For consistency and correctness, line 310 should also include && EmitSymbols in its condition to match the behavior added here.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already under if (EmitSymbols) branch

{
r2rCompilationEntry.SetMetadata(MetadataKeys.EmitSymbols, "true");
r2rCompilationEntry.SetMetadata(MetadataKeys.OutputPDBImage, outputPDBImage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<PublishReadyToRunComposite Condition="'$(PublishReadyToRunUseCrossgen2)' != 'true' or '$(SelfContained)' != 'true'">false</PublishReadyToRunComposite>
<PublishReadyToRunUseRuntimePackOptimizationData Condition="'$(PublishReadyToRunUseRuntimePackOptimizationData)' == ''">true</PublishReadyToRunUseRuntimePackOptimizationData>
<PublishReadyToRunPerfmapFormatVersion Condition="'$(PublishReadyToRunPerfmapFormatVersion)' == ''">1</PublishReadyToRunPerfmapFormatVersion>
<PublishReadyToRunEmitSymbols Condition="'$(PublishReadyToRunEmitSymbols)' == '' and ('$(TargetPlatformIdentifier)' == 'ios' or '$(TargetPlatformIdentifier)' == 'tvos' or '$(TargetPlatformIdentifier)' == 'maccatalyst')">false</PublishReadyToRunEmitSymbols>
</PropertyGroup>

<!--
Expand Down
Loading