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

[dotnet] Ensure appropriate IL Strip value for multi-rid builds #21378

Conversation

haritha-mohan
Copy link
Contributor

IsMultiRidBuild tracks if we are executing an inner build for a multi-rid case. With this approach, if the user specifies a value for EnableAssemblyILStripping it will still be honored. Otherwise, to ensure we don't duplicate assemblies when merging the app bundles due to a strip vs non-strip scenario, IL stripping for the multi-rid build is disabled by default.

There have been past examples of optimizing in the outer-build: #12847
But because IL Stripping is contingent on the evaluation of other RID-specific properties, not sure if that is a feasible approach here.

Fixes #17115

@@ -890,7 +890,7 @@
<EnableAssemblyILStripping>false</EnableAssemblyILStripping>

<!-- Strip if we are AOT and Release -->
<EnableAssemblyILStripping Condition="'$(_RunAotCompiler)' == 'true' And '$(Configuration)' == 'Release'">true</EnableAssemblyILStripping>
<EnableAssemblyILStripping Condition="'$(_RunAotCompiler)' == 'true' And '$(Configuration)' == 'Release' And '$(_IsMultiRidBuild)' != 'true'">true</EnableAssemblyILStripping>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good!

@haritha-mohan haritha-mohan marked this pull request as ready for review October 8, 2024 04:41
Copy link
Member

@dalexsoto dalexsoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haritha-mohan you need to push this to a branch in the main repo not from a fork so it actually builds the PR

@haritha-mohan
Copy link
Contributor Author

@haritha-mohan you need to push this to a branch in the main repo not from a fork so it actually builds the PR

thanks for catching that! was moving between repos 😅 also need to add a test here so will open a updated PR.

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.

3 participants