Merge pull request #15935 from sdmaclea/PR-ARM64-IRREGULAR-NOT
[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   </Target>
28
29   <Target Name="RestoreOptData">
30     <PropertyGroup>
31       <OptDataRestoreCommand>"$(DotnetToolCommand)"</OptDataRestoreCommand>
32       <OptDataRestoreCommand>$(OptDataRestoreCommand) restore</OptDataRestoreCommand>
33       <OptDataRestoreCommand>$(OptDataRestoreCommand) --packages "$(PackagesDir.TrimEnd('/').TrimEnd('\'))"</OptDataRestoreCommand>
34     </PropertyGroup>
35     <Exec Command="$(OptDataRestoreCommand) $(SourceDir).nuget/optdata/optdata.csproj" 
36           StandardOutputImportance="Low" />
37   </Target>
38
39   <!--
40     BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages"
41     target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that
42     the tools are fetched before "Build".
43   -->
44   <Target Name="Sync" BeforeTargets="Build" />
45
46   <Target Name="RestoreNETCorePlatforms" AfterTargets="Build" Condition="'$(RestoreDuringBuild)'=='true'">
47     <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/init/init.csproj"
48           StandardOutputImportance="Low" />
49   </Target>
50
51   <Target Name="CleanAllProjects">
52     <Message Condition="Exists($(RootBinDir))" Importance="High" Text="Removing $(RootBinDir)"/>
53     <RemoveDir Directories="$(RootBinDir)" />
54   </Target>
55   
56 </Project>