Update CoreClr, CoreFx, CoreSetup, PgoData to preview-27129-03, preview.18579.2,...
[platform/upstream/coreclr.git] / build.proj
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3   <Import Project="dir.props" />
4
5   <ItemGroup>
6     <!-- We use build.proj instead of dirs.proj so we don't conflict with the TFS build-->
7     <Project Include="src\build.proj" />
8   </ItemGroup>
9
10   <Import Project="dir.targets" />
11
12   <Import Project="dir.traversal.targets" />
13
14   <Import Project="$(ToolsDir)clean.targets" />
15
16   <!-- The following properties are in place to keep the behavior of build.cmd while we work on the dev workflow steps. -->
17   <PropertyGroup>
18     <!-- To disable the restoration of packages, set RestoreDuringBuild=false or pass /p:RestoreDuringBuild=false.-->
19     <RestoreDuringBuild Condition="'$(RestoreDuringBuild)'==''">true</RestoreDuringBuild>
20   </PropertyGroup>
21
22   <!-- Override clean from dir.traversal.targets and just remove the full BinDir -->
23   <Target Name="Clean">
24     <Delete Files="$(BinDir)SOS.NETCore.*" />
25     <Delete Files="$(BinDir)mscorlib.*" />
26     <Delete Files="$(BinDir)System.Private.CoreLib.*" />
27     <Delete Files="$(BinDir)netcoreapp2.0/R2RDump.*" />
28   </Target>
29
30   <!--
31     BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages"
32     target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that
33     the tools are fetched before "Build".
34   -->
35   <Target Name="Sync" BeforeTargets="Build"
36     DependsOnTargets="RestoreOptData;RestoreNETCorePlatforms" />
37
38   <Target Name="RestoreOptData" Condition="'$(RestoreDuringBuild)'=='true' and '$(BuildType)'=='Release'">
39     <PropertyGroup>
40       <_OptimizationDataFeed Condition="'$(DotNetBuildOffline)' != 'true'">--source https://dotnet.myget.org/F/dotnet-core-optimization-data/api/v3/index.json</_OptimizationDataFeed>
41     </PropertyGroup>
42
43     <Exec Command="$(DotnetRestoreCommand) $(_OptimizationDataFeed) $(SourceDir).nuget/optdata/optdata.csproj"
44           StandardOutputImportance="Low" />
45   </Target>
46
47   <Target Name="RestoreNETCorePlatforms" Condition="'$(RestoreDuringBuild)'=='true'">
48     <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/init/init.csproj"
49           StandardOutputImportance="Low" />
50   </Target>
51
52   <Target Name="CleanAllProjects">
53     <Message Condition="Exists($(RootBinDir))" Importance="High" Text="Removing $(RootBinDir)"/>
54     <RemoveDir Directories="$(RootBinDir)" />
55   </Target>
56
57 </Project>