-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
Directory.Build.targets
145 lines (118 loc) · 6.49 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<Project>
<!--
Common files don't take part in the root tests\src\Directory.Build.targets
This file prevents them from including it as it gets included in its place
If they ever need to take part, we can conditionally include them as documented
here https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build#directorybuildprops-and-directorybuildtargets
-->
<Import Project="$(MSBuildThisFileDirectory)/disableversioncheck.targets"
Condition="'$(DisableVersionCheckImported)' != 'true'" />
<Import Project="$(RepoRoot)eng/liveBuilds.targets" />
<ItemGroup>
<KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
<KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App" />
</ItemGroup>
<Target Name="CopyDependencyToCoreRoot"
DependsOnTargets="ResolveAssemblyReferences;ResolveRuntimeFilesFromLocalBuild">
<ItemGroup>
<RunTimeDependencyExclude Include="$(CORE_ROOT)\**\*.*" />
<RunTimeDependencyExcludeFiles Include="@(RunTimeDependencyExclude -> '%(FileName)%(Extension)')" />
<RunTimeDependencyExcludeFiles Include="@(RunTimeDependencyExclude -> '%(FileName).ni%(Extension)')" />
<RunTimeDependencyExcludeFiles Include="@(RunTimeDependencyExclude -> '%(FileName).pdb')" />
<AllResolvedRuntimeDependencies Include="@(RuntimeCopyLocalItems -> '%(FileName)%(Extension)');@(NativeCopyLocalItems -> '%(FileName)%(Extension)')">
<File>%(Identity)</File>
</AllResolvedRuntimeDependencies>
<RunTimeDependencyCopyLocalFile Include="@(AllResolvedRuntimeDependencies)" Exclude="@(RunTimeDependencyExcludeFiles)"/>
<RunTimeDependencyCopyLocal Include="@(RunTimeDependencyCopyLocalFile -> '%(File)')" />
<RunTimeDependencyCopyLocal Include="$(TargetingPackPath)/*" />
</ItemGroup>
<ItemGroup>
<RunTimeArtifactsExcludeFiles Include="PDB/createdump.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/dbgshim.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/linuxonjit.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/mcs.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/mscordaccore.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/mscordbi.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/mscorrc.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/clrjit_*.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/superpmi.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/superpmi-shim-collector.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/superpmi-shim-counter.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/superpmi-shim-simple.pdb" />
</ItemGroup>
<ItemGroup Condition="'$(MinimalCoreRoot)' == 'true'">
<RunTimeArtifactsExcludeFiles Include="PDB/ilasm.pdb" />
<RunTimeArtifactsExcludeFiles Include="PDB/ildasm.pdb" />
</ItemGroup>
<ItemGroup>
<RunTimeArtifactsIncludeFolders Include="/" />
<!-- Used by the Crossgen comparison job -->
<RunTimeArtifactsIncludeFolders Include="IL/" />
<!-- Used for Crossgen2 R2R tests -->
<RunTimeArtifactsIncludeFolders Include="crossgen2/">
<IncludeSubFolders>True</IncludeSubFolders>
</RunTimeArtifactsIncludeFolders>
<!-- Used for capturing symbolic stack traces using Watson -->
<RunTimeArtifactsIncludeFolders Include="PDB/" />
<!-- Used by the coreroot_determinism test -->
<RunTimeArtifactsIncludeFolders Include="R2RTest/">
<IncludeSubFolders>True</IncludeSubFolders>
</RunTimeArtifactsIncludeFolders>
</ItemGroup>
<ItemGroup>
<!-- Add binary dependencies to copy-local items -->
<RunTimeDependencyCopyLocal
Condition="'%(RuntimeArtifactsIncludeFolders.IncludeSubFolders)' != 'True'"
Include="$(CoreCLRArtifactsPath)%(RunTimeArtifactsIncludeFolders.Identity)*"
Exclude="@(RunTimeArtifactsExcludeFiles -> '$(CoreCLRArtifactsPath)%(Identity)')"
TargetDir="%(RunTimeArtifactsIncludeFolders.Identity)" />
<RunTimeDependencyCopyLocal
Condition="'%(RuntimeArtifactsIncludeFolders.IncludeSubFolders)' == 'True'"
Include="$(CoreCLRArtifactsPath)%(RunTimeArtifactsIncludeFolders.Identity)**/*"
Exclude="@(RunTimeArtifactsExcludeFiles -> '$(CoreCLRArtifactsPath)%(Identity)')"
TargetDir="%(RunTimeArtifactsIncludeFolders.Identity)" />
<RunTimeDependencyCopyLocal
Condition="'$(TargetArchitecture)' != 'x64'"
Include="$(CoreCLRArtifactsPath)x64/crossgen2/clrjit_*"
TargetDir="crossgen2/" />
<RunTimeDependencyCopyLocal
Condition="'$(TargetArchitecture)' != 'x64'"
Include="$(CoreCLRArtifactsPath)x64/crossgen2/jitinterface_*"
TargetDir="crossgen2/" />
</ItemGroup>
<ItemGroup Condition="'$(TargetArchitecture)' == 'wasm'">
<RunTimeDependencyCopyLocal
Include="@(RuntimeFiles)"
TargetDir="runtimepack/native/"/>
<!-- This throws everything in 'native', include many non-native assemblies.
This is done because LibrariesRuntimeFiles includes some .js files that
WasmAppBuilder expects in native/-->
<RunTimeDependencyCopyLocal
Include="@(LibrariesRuntimeFiles)"
TargetDir="runtimepack/native/"/>
<RunTimeDependencyCopyLocal
Include="$(ArtifactsDir)\TargetingPack\**"
TargetDir="TargetingPack/"/>
<!-- Wasm App Builder always builds in Debug -->
<RunTimeDependencyCopyLocal
Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppCurrent)\publish\**"
TargetDir="WasmAppBuilder/"/>
<RunTimeDependencyCopyLocal
Include="$(RepoRoot)\src\tests\Common\wasm-test-runner\WasmTestRunner.proj"
TargetDir="wasm-test-runner/"/>
<RunTimeDependencyCopyLocal
Include="$(MonoProjectRoot)\wasm\runtime-test.js"
TargetDir="runtime-test/"/>
</ItemGroup>
<Copy
SourceFiles="@(RunTimeDependencyCopyLocal)"
DestinationFiles="@(RunTimeDependencyCopyLocal -> '$(CORE_ROOT)/%(TargetDir)%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
</Project>