Skip to content
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

Make it possible to disable method body rewriting #2192

Open
MichalStrehovsky opened this issue Aug 7, 2021 · 2 comments
Open

Make it possible to disable method body rewriting #2192

MichalStrehovsky opened this issue Aug 7, 2021 · 2 comments
Milestone

Comments

@MichalStrehovsky
Copy link
Member

Linker should respect the NoOptimization MethodImpl flag and it should prevent it from messing with instructions in method bodies. Would make it easier to work around issues like #2181 or dotnet/runtime#57010 that now require more creative workarounds.

I'm putting this in 6.0 because the method body rewriting is a relatively new feature, we're still finding bugs in it, and we'll likely find more when 6.0 ships.

@MichalStrehovsky MichalStrehovsky added this to the .NET 6.0 milestone Aug 7, 2021
@vargaz
Copy link
Contributor

vargaz commented Aug 7, 2021

Would be nice to have a linker/msbuild option to turn this off as well so users can work around it if this happens in 3rd party/bcl code.

@MichalStrehovsky
Copy link
Member Author

Setting the trimmode to copy on the problematic assembly might be good enough workaround for 6.0.

@MichalStrehovsky MichalStrehovsky modified the milestones: .NET 6.0, Future Aug 13, 2021
@agocke agocke modified the milestones: Future, .NET 7.0 Oct 1, 2021
@agocke agocke modified the milestones: .NET 7.0, .NET 6.0 Oct 1, 2021
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

No branches or pull requests

3 participants