Disable PerfMap generation for Apple mobile platforms#51545
Disable PerfMap generation for Apple mobile platforms#51545kotlarmilos merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
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
PublishReadyToRunEmitSymbolstofalsefor iOS, tvOS, and macCatalyst platforms in the targets file - Adds a check for the
EmitSymbolsproperty 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 |
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.CrossGen.targets
Outdated
Show resolved
Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.CrossGen.targets
Outdated
Show resolved
Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.CrossGen.targets
Outdated
Show resolved
Hide resolved
…sGen.targets Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| TaskItem r2rCompilationEntry = new(file); | ||
| r2rCompilationEntry.SetMetadata(MetadataKeys.OutputR2RImage, outputR2RImage); | ||
| if (outputPDBImage != null && ReadyToRunUseCrossgen2 && !_crossgen2IsVersion5) | ||
| if (outputPDBImage != null && ReadyToRunUseCrossgen2 && !_crossgen2IsVersion5 && EmitSymbols) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
It is already under if (EmitSymbols) branch
Description
Upstream changes from dotnet/runtime dotnet/runtime#121237