-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dotnet] Fix linker path on Windows #18285
Conversation
When building from Windows, we need to pass the path to the illink assembly located on the Mac to the linker task. The educated guess we've been using is a bit fragile and has been getting us problems almost on each new .NET major release. On top of that, from .NET 8 the linker is in a separate NuGet package, so the assembly is no longer located in the SDK directory on the Mac. The fix is to follow the same approach we use to find the AOT compiler on the Mac by running a target that finds that information on the remote Mac, and brings it back to Windows, where it is cached and use across build. Created a new XamarinBuildTask class to share most of the code needed for this approach.
|
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.
…for the XamarinBuild task. This speeds up the XamarinBuild task tremendously when /tmp is full of stuff: .NET projects will implicity include a lot of files in the project directory, and if we put the project file in /tmp, then MSBuild will search all of /tmp for files to include (and include some of them). This is avoided by putting the project file in a subdirectory with nothing else in it. Also add the binlogs and the output text file in the new temporary directory, which means we can simplify the cleanup code as well (to just remove the temporary directory, instead of each individual file).
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.
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
📚 [PR Build] Artifacts 📚Packages generatedView packagesPipeline on Agent |
✅ API diff for current PR / commitLegacy Xamarin (No breaking changes)
NET (empty diffs)
✅ API diff vs stableLegacy Xamarin (No breaking changes).NET (No breaking changes)✅ Generator diffGenerator diff is empty Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻✅ All tests on macOS M1 - Mac Ventura (13.0) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻✅ All tests on macOS M1 - Mac Big Sur (11.5) passed. Pipeline on Agent |
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: simulator tests. 🎉 All 227 tests passed 🎉 Tests counts✅ bcl: All 69 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
/sudo backport release/7.0.2xx-xcode14.3 |
Backport Job to branch release/7.0.2xx-xcode14.3 Created! The magic is happening here |
Oh no! Backport failed! Please see https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=7788839 for more details. |
When building from Windows, we need to pass the path to the illink assembly located on the Mac to the linker task. The educated guess we've been using is a bit fragile and has been getting us problems almost on each new .NET major release. On top of that, from .NET 8 the linker is in a separate NuGet package, so the assembly is no longer located in the SDK directory on the Mac. The fix is to follow the same approach we use to find the AOT compiler on the Mac by running a target that finds that information on the remote Mac, and brings it back to Windows, where it is cached and use across build. Created a new XamarinBuildTask class to share most of the code needed for this approach. Backport of xamarin#18285.
When building from Windows, we need to pass the path to the illink assembly located on the Mac to the linker task. The educated guess we've been using is a bit fragile and has been getting us problems almost on each new .NET major release. On top of that, from .NET 8 the linker is in a separate NuGet package, so the assembly is no longer located in the SDK directory on the Mac. The fix is to follow the same approach we use to find the AOT compiler on the Mac by running a target that finds that information on the remote Mac, and brings it back to Windows, where it is cached and use across build. Created a new XamarinBuildTask class to share most of the code needed for this approach. Backport of #18285. Co-authored-by: Emanuel Fernandez Dell'Oca <[email protected]>
When building from Windows, we need to pass the path to the illink assembly located on the Mac to the linker task. The educated guess we've been using is a bit fragile and has been getting us problems almost on each new .NET major release. On top of that, from .NET 8 the linker is in a separate NuGet package, so the assembly is no longer located in the SDK directory on the Mac.
The fix is to follow the same approach we use to find the AOT compiler on the Mac by running a target that finds that information on the remote Mac, and brings it back to Windows, where it is cached and use across build.
Created a new XamarinBuildTask class to share most of the code needed for this approach.