This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Repository navigation
[release/6.0.2xx] Add a custom flag to disable marking of copy assemblies - #2437
Merged
agocke merged 1 commit intoJan 6, 2022
Merged
Conversation
Enabled by `--custom-data DisableMarkingOfCopyAssemblies=true` on the command line. Assumes that ALL assemblies on the input are in "copy" action (it doesn't validate this fact). It disables marking basically fully - linker will go over all assemblies, and process them in "copy" mode (copy the original file over) and will call all the custom steps and so on, but it will do no marking (or very little, depends on descriptors and such which this doesn't disable). This is intentionally non-discoverable feature, to be used only by the mono AOT toolchain.
sbomer
approved these changes
Dec 10, 2021
agocke
pushed a commit
to dotnet/runtime
that referenced
this pull request
Nov 16, 2022
…r#2370) (dotnet/linker#2437) Enabled by `--custom-data DisableMarkingOfCopyAssemblies=true` on the command line. Assumes that ALL assemblies on the input are in "copy" action (it doesn't validate this fact). It disables marking basically fully - linker will go over all assemblies, and process them in "copy" mode (copy the original file over) and will call all the custom steps and so on, but it will do no marking (or very little, depends on descriptors and such which this doesn't disable). This is intentionally non-discoverable feature, to be used only by the mono AOT toolchain. Commit migrated from dotnet/linker@e28b7f3
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 a release/6.0.2xx port of #2370
Enabled by
--custom-data DisableMarkingOfCopyAssemblies=trueon the command line. Assumes that ALL assemblies on the input are in "copy" action (it doesn't validate this fact).It disables marking basically fully - linker will go over all assemblies, and process them in "copy" mode (copy the original file over) and will call all the custom steps and so on, but it will do no marking (or very little, depends on descriptors and such which this doesn't disable).
This is intentionally non-discoverable feature, to be used only by the mono AOT toolchain.
Fixes #2089.
Customer impact
Xamarin "notrim" mode (used in AOT scenarios for debug builds for example) regressed with .NET 6 trimmer. The trimmer used to run quickly (several seconds), now it's much slower (5x slower roughly, sometimes worse). The change allows Xamarin SDK to tell the trimmer to avoid doing most of the expensive work as it won't be trimming anything. The speedup is very visible: Hello world app build went from 19s to 7s.
Testing
Validated with Xamarin that the change fixes the problem.
Risk
Low - added new command line option specifically to be used by Xamarin. Undocumented, not to be used by anything else.