-
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
Do not enable dedup when targeting maccatalyst-x64
#20945
Conversation
|
This comment has been minimized.
This comment has been minimized.
📚 [CI Build] Artifacts 📚Packages generatedView packagesPipeline on Agent |
💻 [CI Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Big Sur (11) passed 💻✅ All tests on macOS M1 - Mac Big Sur (11) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
…talyst-x64` (#20946) Backport of #20945 --- ## Description This is a follow-up PR to: #20936 We should not enable dedup when targeting `maccatalyst-x64` because in case when the project file specifies `MtouchInterpreter=all,-System.Private.CoreLib`, the build will run the full AOT compiler with interpreter enabled. In this setup the runtime is configured to run in interp only mode: https://github.com/xamarin/xamarin-macios/blob/97a91cc4e3bf7cf8a4c657ca00ece620f2e28e91/tools/common/Target.cs#L812-L813 which means that during runtime, AOT images will be ignored - aot runtime will load them but mark them as unusuable since they are compiled with `full` compiler switch and the code falls back to interpreter (ref: https://github.com/dotnet/runtime/blob/efebf202a4a9bd78702bf4bf28a027f093e15d89/src/mono/mono/mini/aot-runtime.c#L2131-L2148 ) This is problematic for the `aot-instances` container image, which has a special handling at the runtime and does not accept it to be marked as unusable (we might want to revisit this in the future): https://github.com/dotnet/runtime/blob/efebf202a4a9bd78702bf4bf28a027f093e15d89/src/mono/mono/mini/aot-runtime.c#L2527-L2529 ## Changes This PR disables dedup optimization when targeting `maccatalyst-x64` and updates the required tests to match the behavior. --------- Co-authored-by: Ivan Povazan <[email protected]> Co-authored-by: GitHub Actions Autoformatter <[email protected]>
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 168 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
…ile platforms (#20951) ## Description Previous fix #20941 did not take into account that when we target non arm64 apple mobile platforms we are using `MONO_AOT_MODE_INTERP_ONLY` which cannot use dedup optimization as it discards AOT images during runtime (as noted in: #20945). ## Changes - Enable dedup only when targeting ARM64 - Fix tests to cover builds for both ARM64 and X64 builds Finally, the change was tested against MAUI iossimulator-x64 template app
…atforms (#20952) ## Description Previous fix #20945 did not take into account that when we target non arm64 apple mobile platforms we are using `MONO_AOT_MODE_INTERP_ONLY` which cannot use dedup optimization as it discards AOT images during runtime. ## Changes - Enable dedup only when targeting ARM64 - Fix tests to cover builds for both ARM64 and X64 builds Finally, the change was tested against MAUI iossimulator-x64 template app
Backport of #20952 -------- ## Description Previous fix #20945 did not take into account that when we target non arm64 apple mobile platforms we are using `MONO_AOT_MODE_INTERP_ONLY` which cannot use dedup optimization as it discards AOT images during runtime. ## Changes - Enable dedup only when targeting ARM64 - Fix tests to cover builds for both ARM64 and X64 builds Finally, the change was tested against MAUI iossimulator-x64 template app --------- Co-authored-by: Ivan Povazan <[email protected]> Co-authored-by: Ivan Povazan <[email protected]>
Description
This is a follow-up PR to: #20936
We should not enable dedup when targeting
maccatalyst-x64
because in case when the project file specifiesMtouchInterpreter=all,-System.Private.CoreLib
, the build will run the full AOT compiler with interpreter enabled.In this setup the runtime is configured to run in interp only mode:
xamarin-macios/tools/common/Target.cs
Lines 812 to 813 in 97a91cc
which means that during runtime, AOT images will be ignored - aot runtime will load them but mark them as unusuable since they are compiled with
full
compiler switch and the code falls back to interpreter (ref: https://github.com/dotnet/runtime/blob/efebf202a4a9bd78702bf4bf28a027f093e15d89/src/mono/mono/mini/aot-runtime.c#L2131-L2148 )This is problematic for the
aot-instances
container image, which has a special handling at the runtime and does not accept it to be marked as unusable (we might want to revisit this in the future):https://github.com/dotnet/runtime/blob/efebf202a4a9bd78702bf4bf28a027f093e15d89/src/mono/mono/mini/aot-runtime.c#L2527-L2529
Changes
This PR disables dedup optimization when targeting
maccatalyst-x64
and updates the required tests to match the behavior.Backports:
maccatalyst-x64
#20946