Skip to content

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

Merged
merged 2 commits into from
Jun 6, 2025

Conversation

jakobbotsch
Copy link
Member

Makes the builds that happen in the SPMI pipelines a bit faster. Maybe helps in some other cases too.

Makes the builds that happen in the SPMI pipelines a bit faster. Maybe
helps in some other cases too.
@Copilot Copilot AI review requested due to automatic review settings June 5, 2025 08:15
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 5, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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 or clr.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 and clr.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. -->

Comment on lines 358 to 362
</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" />
Copy link
Preview

Copilot AI Jun 5, 2025

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.

@jakobbotsch jakobbotsch requested a review from jkoritzinsky June 5, 2025 08:22
@jakobbotsch jakobbotsch added area-Infrastructure-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jun 5, 2025
Copy link
Contributor

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

@jkoritzinsky
Copy link
Member

Can you enable this to also build when you specify clr.crossarchtools?

@jakobbotsch jakobbotsch merged commit f9c5e1a into dotnet:main Jun 6, 2025
150 checks passed
@jakobbotsch jakobbotsch deleted the avoid-alljits-build branch June 6, 2025 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants