-
Notifications
You must be signed in to change notification settings - Fork 545
Open
Labels
enhancementThe issue or pull request is an enhancementThe issue or pull request is an enhancementmsbuildIssues affecting our msbuild tasks/targetsIssues affecting our msbuild tasks/targets
Milestone
Description
Evaluate making the _RunRidSpecificBuild
target run the rid-specific builds in parallel
The inner MSBuild task in the _RunRidSpecificBuild
for reference:
macios/dotnet/targets/Xamarin.Shared.Sdk.targets
Lines 393 to 407 in bf8f472
<!-- Execute the inner builds --> | |
<!-- We force AppendRuntimeIdentifierToOutputPath=true because otherwise the inner builds might end up writing to the same directory --> | |
<MSBuild | |
Projects="$(MSBuildProjectFile)" | |
Targets="_BuildRidSpecificAppBundle" | |
Properties=" | |
AppendRuntimeIdentifierToOutputPath=true; | |
RuntimeIdentifier=%(_RuntimeIdentifiersAsItems.Identity); | |
_CodesignItemsPath=%(_RuntimeIdentifiersAsItems.RidSpecificCodesignItemsPath); | |
_MtouchSymbolsList=%(_RuntimeIdentifiersAsItems.RidSpecificSymbolsListPath); | |
_UserFrameworksWithoutDebugSymbolsPath=%(_RuntimeIdentifiersAsItems.RidSpecificUserFrameworksWithoutDebugSymbolsPath); | |
$(_RidSpecificProperties); | |
"> | |
<Output TaskParameter="TargetOutputs" ItemName="_AssemblyPublishDirectories" /> | |
</MSBuild> |
We could make this task run the inner MSBuild
tasks in parallel.
Potential pros:
- Faster build due to parallelization.
- Find bugs due to logic errors / double writes, etc.
Potential cons:
- If it's not safe to run rid-specific builds in parallel, any bugs are likely to be random and hard to diagnose.
- Slower build due to CPU/memory thrashing (we already AOT-compilation for instance to max out the CPU, doing it twice will make the build slower).
Things to consider:
- Only release builds are multi-rid, and we don't care as much about speed for release builds as we do for debug builds.
Metadata
Metadata
Assignees
Labels
enhancementThe issue or pull request is an enhancementThe issue or pull request is an enhancementmsbuildIssues affecting our msbuild tasks/targetsIssues affecting our msbuild tasks/targets