Add linker step to remove calls to Console.WriteLine #16781
Labels
app-size
enhancement
The issue or pull request is an enhancement
good first issue
This is a good first issue for someone to start working with our code
Milestone
The System.Console assembly is quite expensive size-wise, so an idea might be to add a linker step that can replace calls to Console.WriteLine (and other related Console functions) with nops.
This could be extended to take a user-provided list of functions to replace with nops (this should be fairly trivial to implement if we decided that these functions must be void functions with no ref/out/pointer arguments).
In the particular case for Console.WriteLine, we could have a few modes:
Ref: dotnet/maui#11405
The text was updated successfully, but these errors were encountered: