summaryrefslogtreecommitdiff
path: root/src/build.proj
blob: fce65717176d3c5125daebb0076c8d4defdd32dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\dir.props"/>
  
  <!-- List the projects that need to be built -->
  <ItemGroup>
    <Project Condition="$(SkipSOS) != 'true'" Include="ToolBox\SOS\NETCore\SOS.NETCore.csproj" />
    <Project Include="mscorlib\System.Private.CoreLib.csproj" />
  </ItemGroup>

  <Import Project="..\dir.targets" />

  <Import Project="..\dir.traversal.targets" />

  <Target Name="MovePostBuildBinaries" AfterTargets="Build">
    <Move SourceFiles="@(BinariesToMove)"
        DestinationFolder="$(BinDir)" />
  </Target>

  <ItemGroup>
    <ILToCopy Include="$(BinDir)System.Private.CoreLib.dll"/>
    <PDBSToMove Include="$(BinDir)System.Private.CoreLib.pdb"/>
  </ItemGroup>

  <PropertyGroup>
    <CoreLibPath>$(BinDir)System.Private.CoreLib.dll</CoreLibPath>
    <CoreLibPDBPath>$(BinDir)System.Private.CoreLib.pdb</CoreLibPDBPath>
  </PropertyGroup>

  <Target Name="CopyCoreLib" AfterTargets="Build">
    <Copy Condition="Exists($(CoreLibPath))"
        SourceFiles="@(ILToCopy)"
        DestinationFolder="$(BinDir)IL" />
  </Target>

  <Target Name="MovePDB" AfterTargets="Build">
    <Move Condition="Exists($(CoreLibPDBPath))"
        SourceFiles="@(PDBSToMove)"
        DestinationFolder="$(BinDir)PDB" />
  </Target>

  <PropertyGroup>
    <RunEnforcePGO Condition="$(__EnforcePgo) == '1'">true</RunEnforcePGO>
    <RunEnforcePGO Condition="$(__BuildArch) == 'arm' OR $(__BuildArch) == 'arm64'">false</RunEnforcePGO>
  </PropertyGroup>

  <Target Name="EnforcePGO" Condition="$(RunEnforcePGO) == 'true'" AfterTargets="Build">
    <ItemGroup>
      <PGOEnforcedFiles Include="$(BinDir)coreclr.dll" />
      <PGOEnforcedFiles Include="$(BinDir)clrjit.dll" />
    </ItemGroup>

    <Message Text="Checking if the following DLLs are properly compiled with PGO" Importance="High" />
    <Exec Command="python $(MSBuildThisFileDirectory)scripts\pgocheck.py @(PGOEnforcedFiles)" />
  </Target>
</Project>