[dotnet-linker] Create an xml descriptor instead of manual marking when applying the [Preserve] attribute.#25109
Conversation
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.
7c5da69 to
838cd8d
Compare
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.
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.
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Azure Pipelines: 2 pipeline(s) require an authorized user to comment /azp run to run. |
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.
|
Azure Pipelines: 2 pipeline(s) require an authorized user to comment /azp run to run. |
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.
…en applying the [Preserve] attribute. Create an xml descriptor file instead of manually marking when applying the [Preserve] attribute. I first tried using [DynamicDependency] attributes, but it turns out [DynamicDependency] attributes can't accurately express/replace [Preserve] semantics, so I went with an xml descriptor file instead. The [DynamicDependency] attribute code is still present, as an opt-in, because it was already there used for NativeAOT (even though we're always using the xml descriptor logic now, even for NativeAOT). This makes it easier to move this code out of a custom linker step in the future. Also move the removal of any [Preserve] attributes to the RemoveAttributes step. Contributes towards #17693.
1dcbffe to
a573a2e
Compare
|
Azure Pipelines: 2 pipeline(s) require an authorized user to comment /azp run to run. |
✅ [CI Build #a573a2e] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #a573a2e] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #a573a2e] Build passed (Build macOS tests) ✅Pipeline on Agent |
🚀 [CI Build #a573a2e] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 156 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Create an xml descriptor file instead of manually marking when applying the [Preserve] attribute.
I first tried using [DynamicDependency] attributes, but it turns out [DynamicDependency] attributes can't accurately express/replace [Preserve] semantics, so I went with an xml descriptor file instead.
The [DynamicDependency] attribute code is still present, as an opt-in, because it was already there used for NativeAOT (even though we're always using the xml descriptor logic now, even for NativeAOT).
This makes it easier to move this code out of a custom linker step in the future.
Also move the removal of any [Preserve] attributes to the RemoveAttributes step.
Contributes towards #17693.