summaryrefslogtreecommitdiff
path: root/build.proj
diff options
context:
space:
mode:
authorWes Haggard <Wes.Haggard@microsoft.com>2018-03-26 11:02:53 -0700
committerWes Haggard <Wes.Haggard@microsoft.com>2018-03-27 13:07:51 -0700
commit323f09d890015ea7fccece60d1681dd8d3e5f1f2 (patch)
tree1b1cb6cdc9e31402b87812c8a9c72289eee7092b /build.proj
parentad1ad9e87965f23b5821216affb906aff63fe5da (diff)
downloadcoreclr-323f09d890015ea7fccece60d1681dd8d3e5f1f2.tar.gz
coreclr-323f09d890015ea7fccece60d1681dd8d3e5f1f2.tar.bz2
coreclr-323f09d890015ea7fccece60d1681dd8d3e5f1f2.zip
Merge various restore tasks into one Sync target
There were various restore targets happening independently when they should all be combined so the sync step can be independent from the build step. This change merges them together under the Sync target. In particular this moves RestoreOptData and RestoreNETCorePlatforms to be part of the sync step instead of being individually ran. Pass BuildType to sync commands so optdata gets restored correctly
Diffstat (limited to 'build.proj')
-rw-r--r--build.proj19
1 files changed, 10 insertions, 9 deletions
diff --git a/build.proj b/build.proj
index bbec18785b..1a633a65b4 100644
--- a/build.proj
+++ b/build.proj
@@ -26,7 +26,15 @@
<Delete Files="$(BinDir)System.Private.CoreLib.*" />
</Target>
- <Target Name="RestoreOptData">
+ <!--
+ BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages"
+ target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that
+ the tools are fetched before "Build".
+ -->
+ <Target Name="Sync" BeforeTargets="Build"
+ DependsOnTargets="RestoreOptData;RestoreNETCorePlatforms" />
+
+ <Target Name="RestoreOptData" Condition="'$(RestoreDuringBuild)'=='true' and '$(BuildType)'=='Release'">
<PropertyGroup>
<_OptimizationDataFeed Condition="'$(DotNetBuildOffline)' != 'true'">--source https://dotnet.myget.org/F/dotnet-core-optimization-data/api/v3/index.json</_OptimizationDataFeed>
</PropertyGroup>
@@ -35,14 +43,7 @@
StandardOutputImportance="Low" />
</Target>
- <!--
- BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages"
- target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that
- the tools are fetched before "Build".
- -->
- <Target Name="Sync" BeforeTargets="Build" />
-
- <Target Name="RestoreNETCorePlatforms" AfterTargets="Build" Condition="'$(RestoreDuringBuild)'=='true'">
+ <Target Name="RestoreNETCorePlatforms" Condition="'$(RestoreDuringBuild)'=='true'">
<Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/init/init.csproj"
StandardOutputImportance="Low" />
</Target>