Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[One .NET] run per-RID builds in parallel (dotnet#6338)
Context: https://docs.microsoft.com/visualstudio/msbuild/msbuild-task During .NET 6 builds, we run a portion of the build in an `<MSBuild/>` task nested build per-`$(RuntimeIdentifier)`. The work in the nested build is done in separate directories for each RID, so we should be able to do the work in parallel for: * `ILLink` * AOT compilation We have to use the `%(AdditionalProperties)` item metadata on the list of projects (which is the same project) passed to the `<MSBuild/>` task. One point of concern is when you have a property at the end of `%(AdditionalProperties)`: _OuterIntermediateOutputPath=$(IntermediateOutputPath); The `;` will be included in the path if this is the last property! I reworked `$(_AdditionalProperties)` so that there will not be any trailing `;` that could cause issues. ~~ Results ~~ Building `dotnet new android` on my Windows PC with `--no-restore`. This is currently two RIDs by default. Δ = Improvement = (1-(After/Before))*100%. | | Before (s) | After (s) | Δ | | ----------------: | ------------: | ------------: | --: | | Debug | 00:00:06.86 | 00:00:06.76 | 1% | | Release | 00:00:19.00 | 00:00:13.53 | 29% | | Release with AOT | 00:00:23.95 | 00:00:17.72 | 26% | A `Debug` build has small improvement. `Release` builds have the most improvement, saving 5-6 seconds. Apps with four RIDs could have even more savings.
- Loading branch information