Skip to content

Conversation

@elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Nov 18, 2025

  • Allow setting Crossgen2OutputFormat in tests - passed as -f <format> to crossgen2
  • Update generated test scripts to handle Mach-O output format for crossgen2, linking the produced object into a dynamic library
  • Enable PlatformNativeR2R test on macOS and set format to macho

cc @dotnet/appmodel @AaronRobinsonMSFT

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 18, 2025
@elinor-fung elinor-fung added area-ReadyToRun-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Nov 18, 2025
@am11 am11 closed this Nov 20, 2025
@am11 am11 reopened this Nov 20, 2025
@am11 am11 added os-mac-os-x macOS aka OSX os-ios Apple iOS labels Nov 20, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to 'os-ios': @vitek-karas, @kotlarmilos, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

@am11
Copy link
Member

am11 commented Nov 20, 2025

Will it be exercised with /azp run runtime-coreclr crossgen2 or /azp run runtime-ioslike?

@elinor-fung
Copy link
Member Author

It should actually be part of the regular run (and actually test R2R since it has AlwaysUseCrossgen2=true). The console log from this PR shows the PlatformNativeR2R test being crossgen-ed and run.

@elinor-fung elinor-fung marked this pull request as ready for review November 20, 2025 21:06
Copilot AI review requested due to automatic review settings November 20, 2025 21:06
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 enables the PlatformNativeR2R test on macOS by adding support for Mach-O output format in crossgen2 compilation. The changes introduce a CrossGen2OutputFormat property that can be passed to crossgen2, update the test generation scripts to handle Mach-O object files and link them into dynamic libraries, and enable the previously disabled test on macOS and Apple mobile platforms.

Key Changes:

  • Added CrossGen2OutputFormat property support in test project configuration
  • Updated bash script generation to handle Mach-O format output, including linking .o files into .dylib libraries
  • Enabled PlatformNativeR2R test for Windows, macOS, and Apple mobile platforms (previously Windows-only)

Reviewed Changes

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

File Description
src/tests/Loader/PlatformNativeR2R/PlatformNativeR2R.csproj Removes Windows-only restriction, updates platform condition to include macOS/Apple targets, and sets CrossGen2OutputFormat to macho
src/tests/Loader/PlatformNativeR2R/PlatformNativeR2R.cs Enables previously commented-out assertion for READYTORUN_FLAG_PlatformNativeImage
src/tests/Common/CLRTest.CrossGen.targets Adds support for CrossGen2OutputFormat parameter, implements Mach-O linking logic with clang, updates file extension handling for composite builds, and cleans up composite-r2r files with wildcard pattern

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

@AaronRobinsonMSFT AaronRobinsonMSFT left a comment

Choose a reason for hiding this comment

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

💩

@elinor-fung elinor-fung merged commit 8566685 into dotnet:main Nov 24, 2025
74 checks passed
@elinor-fung elinor-fung deleted the r2r-test-mac branch November 24, 2025 18:27
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.

3 participants