Merge pull request #17531 from BruceForstall/SpmiProtectJitStartup
[platform/upstream/coreclr.git] / src / build.proj
1 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2   <Import Project="..\dir.props"/>
3   
4   <!-- List the projects that need to be built -->
5   <ItemGroup>
6     <Project Condition="$(SkipSOS) != 'true'" Include="ToolBox\SOS\NETCore\SOS.NETCore.csproj" />
7     <Project Include="mscorlib\System.Private.CoreLib.csproj" />
8   </ItemGroup>
9
10   <Import Project="..\dir.targets" />
11
12   <Import Project="..\dir.traversal.targets" />
13
14   <Target Name="MovePostBuildBinaries" AfterTargets="Build">
15     <Move SourceFiles="@(BinariesToMove)"
16         DestinationFolder="$(BinDir)" />
17   </Target>
18
19   <ItemGroup>
20     <ILToCopy Include="$(BinDir)System.Private.CoreLib.dll"/>
21     <PDBSToMove Include="$(BinDir)System.Private.CoreLib.pdb"/>
22   </ItemGroup>
23
24   <PropertyGroup>
25     <CoreLibPath>$(BinDir)System.Private.CoreLib.dll</CoreLibPath>
26     <CoreLibPDBPath>$(BinDir)System.Private.CoreLib.pdb</CoreLibPDBPath>
27   </PropertyGroup>
28
29   <Target Name="CopyCoreLib" AfterTargets="Build">
30     <Copy Condition="Exists($(CoreLibPath))"
31         SourceFiles="@(ILToCopy)"
32         DestinationFolder="$(BinDir)IL" />
33   </Target>
34
35   <Target Name="MovePDB" AfterTargets="Build">
36     <Move Condition="Exists($(CoreLibPDBPath))"
37         SourceFiles="@(PDBSToMove)"
38         DestinationFolder="$(BinDir)PDB" />
39   </Target>
40
41   <PropertyGroup>
42     <RunEnforcePGO Condition="$(__EnforcePgo) == '1'">true</RunEnforcePGO>
43     <RunEnforcePGO Condition="$(__BuildArch) == 'arm' OR $(__BuildArch) == 'arm64'">false</RunEnforcePGO>
44   </PropertyGroup>
45
46   <Target Name="EnforcePGO" Condition="$(RunEnforcePGO) == 'true'" AfterTargets="Build">
47     <ItemGroup>
48       <PGOEnforcedFiles Include="$(BinDir)coreclr.dll" />
49       <PGOEnforcedFiles Include="$(BinDir)clrjit.dll" />
50     </ItemGroup>
51
52     <Message Text="Checking if the following DLLs are properly compiled with PGO" Importance="High" />
53     <Exec Command="python $(MSBuildThisFileDirectory)scripts\pgocheck.py @(PGOEnforcedFiles)" />
54   </Target>
55 </Project>