Skip to content

Conversation

@rolfbjarne
Copy link
Member

Aggressive attribute trimming removes attributes used by the trimmer. This is
fine as long as we don't run two trimmers - because then the first pass
would remove attributes needed by the second pass, which is exactly what
happens when we're building using NativeAOT: we first run ILLink, then
NativeAOT's trimmer.

If aggressive attribute trimming is enabled in this scenario, ILLink will
remove attributes required by NativeAOT to work correctly, so disable
aggressive attribute trimming.

Fixes #22065.

…ativeAOT. Fixes #22065.

Aggressive attribute trimming removes attributes used by the trimmer. This is
fine as long as we don't run _two_ trimmers - because then the first pass
would remove attributes needed by the second pass, which is exactly what
happens when we're building using NativeAOT: we first run ILLink, then
NativeAOT's trimmer.

If aggressive attribute trimming is enabled in this scenario, ILLink will
remove attributes required by NativeAOT to work correctly, so disable
aggressive attribute trimming.

Fixes #22065.
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne linked an issue Feb 11, 2025 that may be closed by this pull request
@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build] Build passed (Build packages) ✅

Pipeline on Agent
Hash: a8df0c44fb654df71449c0a73edd6517e8b4a30b [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: a8df0c44fb654df71449c0a73edd6517e8b4a30b [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: a8df0c44fb654df71449c0a73edd6517e8b4a30b [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: a8df0c44fb654df71449c0a73edd6517e8b4a30b [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: a8df0c44fb654df71449c0a73edd6517e8b4a30b [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: a8df0c44fb654df71449c0a73edd6517e8b4a30b [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: a8df0c44fb654df71449c0a73edd6517e8b4a30b [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [CI Build] Windows Integration Tests failed ❌

❌ Failed ❌

Pipeline on Agent
Hash: a8df0c44fb654df71449c0a73edd6517e8b4a30b [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

.NET ( No breaking changes )

❗ API diff vs stable (Breaking changes)

.NET ( ❗ Breaking changes ❗ )

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: a8df0c44fb654df71449c0a73edd6517e8b4a30b [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 112 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 8 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: a8df0c44fb654df71449c0a73edd6517e8b4a30b [PR build]

@rolfbjarne
Copy link
Member Author

Windows test failure is unrelated (#22178).

@rolfbjarne rolfbjarne merged commit 9c19f63 into net10.0 Feb 20, 2025
45 of 47 checks passed
@rolfbjarne rolfbjarne deleted the dev/rolf/no-aggressive-nativeaot-attribute-trimming branch February 20, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[net10.0] Aggressive attribute trimming breaks NativeAOT builds

4 participants