Skip to content

Conversation

@kotlarmilos
Copy link
Member

Description

Upstream changes from dotnet/runtime dotnet/runtime#121237

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR disables ReadyToRun symbol emission for iOS, tvOS, and macCatalyst platforms by default. The change prevents compilation errors or unsupported scenarios when building for these Apple platforms with ReadyToRun compilation enabled.

  • Sets PublishReadyToRunEmitSymbols to false for iOS, tvOS, and macCatalyst platforms in the targets file
  • Adds a check for the EmitSymbols property before setting symbol-related metadata in the compilation task

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Microsoft.NET.CrossGen.targets Adds conditional property setting to disable symbol emission for iOS, tvOS, and macCatalyst
PrepareForReadyToRunCompilation.cs Adds EmitSymbols condition to prevent setting symbol metadata when symbol emission is disabled

…sGen.targets

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

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

@kotlarmilos kotlarmilos merged commit 2b9fc02 into main Nov 5, 2025
31 of 32 checks passed
@kotlarmilos kotlarmilos deleted the bugfix/disable-perfmap-apple-mobile branch November 5, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants