-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Avoid building JITs for cross tools when unnecessary #116332
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
Conversation
Makes the builds that happen in the SPMI pipelines a bit faster. Maybe helps in some other cases too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
The PR updates the cross-tool JIT build logic to only include JITs when the selected cross-component subsets explicitly require crossgen2 or ILC, improving overall build speed.
- Narrow JIT builds to subsets containing
clr.tools
orclr.nativecorelib
- Updated comment to reflect the more precise build condition
Comments suppressed due to low confidence (1)
eng/Subsets.props:361
- [nitpick] Consider clarifying this comment by explicitly naming the subset keys (
clr.tools
andclr.nativecorelib
) used in the Condition to make the rationale and matching criteria clearer.
<!-- crossgen2/ILC have dependencies on the JITs, so build them if the cross component includes crossgen2/ILC. -->
eng/Subsets.props
Outdated
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<!-- When building cross components, always build the JITs. We will need them for running crossgen2 and ILC in the build. --> | ||
<_CrossToolSubset Condition="'$(_BuildCrossComponents)' == 'true'" Include="ClrAllJitsSubset=true" /> | ||
<!-- crossgen2/ILC have dependencies on the JITs, so build them if the cross component includes crossgen2/ILC. --> | ||
<_CrossToolSubset Condition="'$(_BuildCrossComponents)' == 'true' and ($(_subset.Contains('+clr.tools+')) or $(_subset.Contains('+clr.nativecorelib+')))" Include="ClrAllJitsSubset=true" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] To improve readability and reuse, consider extracting the combined MSBuild Condition into a named property (e.g., ShouldBuildCrossJits
) and then referencing that property here.
Copilot uses AI. Check for mistakes.
Tagging subscribers to this area: @hoyosjs |
Can you enable this to also build when you specify clr.crossarchtools? |
Makes the builds that happen in the SPMI pipelines a bit faster. Maybe helps in some other cases too.