[msbuild] Copy some ILLink output back to Windows when building remotely.#25235
Merged
[msbuild] Copy some ILLink output back to Windows when building remotely.#25235
Conversation
…re native source code. This fixes an issue introduced recently where we're generating apply-preserve-attribute.xml on the remote Mac, but we need the contents on Windows for the NativeAOT compiler.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Windows-remote build pipeline for iOS so that selected ILLink outputs produced on the remote Mac are copied back to Windows, enabling subsequent Windows-side steps (notably for CoreCLR/NativeAOT scenarios).
Changes:
- Adds a new
CopyToWindowsswitch to theXamarin.MacDev.Tasks.ILLinktask and wires it up from the Windows remote targets whenUseMonoRuntime=false. - Introduces helper plumbing in
XamarinTaskto support copying files back to Windows using aTaskRunnerinstance from remote execution. - Updates ILLink’s remote-execution behavior to download linked outputs (and some linker cache outputs) to Windows after remote completion.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.After.targets | Enables ILLink output copying back to Windows for non-Mono runtime builds by setting/passing CopyToWindows. |
| msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs | Adds a static helper overload to copy files back to Windows given an explicit MSBuild Task instance. |
| msbuild/Xamarin.MacDev.Tasks/Tasks/ILLink.cs | Implements CopyToWindows behavior for remote ILLink execution and adjusts output-file placeholder creation logic accordingly. |
This comment has been minimized.
This comment has been minimized.
Collaborator
✅ [PR Build #c202a58] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mauroa
approved these changes
Apr 23, 2026
dalexsoto
approved these changes
Apr 23, 2026
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is needed when building iOS apps using CoreCLR or NativeAOT remotely (in
the .NET 11 branch), and I'm adding these changes into main to ease upcoming
changes to these files in main.
No tests here, but the net11.0 branch already contains tests that will verify this.
Ref: #24521