-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
Directory.Build.targets
40 lines (31 loc) · 1.47 KB
/
Directory.Build.targets
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
<Project>
<Import Project="..\..\Directory.Build.targets" />
<ItemGroup>
<BuiltBinary Include="$(TargetPath)" />
<_AllPdbs Include="@(BuiltBinary -> '%(RootDir)%(Directory)%(Filename).pdb')">
<FolderName>$([System.IO.Directory]::GetParent(`%(Identity)`).Name)</FolderName>
</_AllPdbs>
</ItemGroup>
<!-- Target used to consolidate all PDBs into a single location, except the aotsdk
PDBs, as S.P.C will overwrite the coreclr PDBs -->
<Target Name="MoveSymbolFiles"
AfterTargets="Build"
Condition="Exists(@(_AllPdbs))"
Inputs="@(_AllPdbs)"
Outputs="@(_AllPdbs -> '$(RuntimeBinDir)PDB/%(Filename).pdb')">
<Move SourceFiles="@(_AllPdbs)"
DestinationFolder="$(RuntimeBinDir)PDB"
Condition="'%(_AllPdbs.FolderName)' != 'aotsdk'" />
</Target>
<Target Name="MoveAotSymbolFiles"
AfterTargets="Build"
Condition="Exists(@(_AllPdbs))"
Inputs="@(_AllPdbs)"
Outputs="@(_AllPdbs -> '$(RuntimeBinDir)PDB/aotsdk/%(Filename).pdb')">
<Move SourceFiles="@(_AllPdbs)"
DestinationFolder="$(RuntimeBinDir)PDB/aotsdk"
Condition="'%(_AllPdbs.FolderName)' == 'aotsdk'" />
</Target>
<!-- Import targets here to have TargetPath and other macros defined. Limit to CoreLib. -->
<Import Condition="'$(MSBuildProjectName)' == 'System.Private.CoreLib' or '$(IsNativeAotProject)' == 'true'" Project="$(RepositoryEngineeringDir)illink.targets" />
</Project>