-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
Directory.Build.targets
201 lines (162 loc) · 9.58 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<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" />
<PropertyGroup>
<GCStressDependsOnCoreDisTools>false</GCStressDependsOnCoreDisTools>
<GCStressDependsOnCoreDisTools Condition="'$(TargetOS)' == 'windows' And ('$(TargetArchitecture)' == 'x64' Or '$(TargetArchitecture)' == 'x86')">true</GCStressDependsOnCoreDisTools>
<GCStressDependsOnCoreDisTools Condition="'$(TargetOS)' == 'Linux' And '$(TargetArchitecture)' == 'x64'">true</GCStressDependsOnCoreDisTools>
<CopyCoreDisToolsToCoreRoot>false</CopyCoreDisToolsToCoreRoot>
<CopyCoreDisToolsToCoreRoot Condition="$(GCStressDependsOnCoreDisTools) And '$(DotNetBuildFromSource)' != 'true'">true</CopyCoreDisToolsToCoreRoot>
<!-- Non-desktop OS's use a custom dotnet host, instead of corerun -->
<IsDesktopOS Condition="'$(TargetsBrowser)' != 'true' and '$(TargetsAndroid)' != 'true' and '$(TargetstvOS)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetsMacCatalyst)' != 'true'">true</IsDesktopOS>
</PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)coredistools.targets" Condition="$(CopyCoreDisToolsToCoreRoot)" />
<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)/*" />
<RunTimeDependencyCopyLocal Include="$(TargetingPackPath)/xunit.*" TargetDir="xunit/" />
</ItemGroup>
<ItemGroup>
<RunTimeArtifactsExcludeFiles Include="PDB/createdump.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="/" />
<!-- Experiment -->
<RunTimeArtifactsIncludeFolders Include="R2RDump/" />
<!-- 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>
<!-- Used by disasm output verification tests -->
<RunTimeArtifactsIncludeFolders Include="SuperFileCheck/">
<IncludeSubFolders>True</IncludeSubFolders>
</RunTimeArtifactsIncludeFolders>
<!-- XUnit runner harness assemblies that we don't want to mix in with the framework in Core_Root -->
<RunTimeArtifactsIncludeFolders Include="xunit/" />
</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)" />
</ItemGroup>
<PropertyGroup>
<Crossgen2Dir />
<Crossgen2Dir Condition="'$(TargetArchitecture)' != 'x64' and '$(BuildArchitecture)' == 'x64'">$(CoreCLRArtifactsPath)x64/crossgen2</Crossgen2Dir>
</PropertyGroup>
<ItemGroup Condition="'$(Crossgen2Dir)' != ''">
<RunTimeDependencyCopyLocal
Include="
$(Crossgen2Dir)/clrjit_*;
$(Crossgen2Dir)/jitinterface_*;
$(Crossgen2Dir)/Microsoft.DiaSymReader.Native.*.dll"
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/%(LibrariesRuntimeFiles.NativeSubDirectory)/"
Condition="'%(LibrariesRuntimeFiles.NativeSubDirectory)' != ''" />
<RunTimeDependencyCopyLocal
Include="@(LibrariesRuntimeFiles)"
TargetDir="runtimepack/native/"
Condition="'%(LibrariesRuntimeFiles.NativeSubDirectory)' == ''" />
<RunTimeDependencyCopyLocal
Include="$(ArtifactsDir)\TargetingPack\**"
TargetDir="TargetingPack/"/>
<!-- Wasm App Builder always builds in Debug -->
<RunTimeDependencyCopyLocal
Include="$(ArtifactsBinDir)\WasmAppBuilder\Debug\$(NetCoreAppToolCurrent)\**"
TargetDir="WasmAppBuilder/"/>
<RunTimeDependencyCopyLocal
Include="$(ArtifactsBinDir)\MonoTargetsTasks\Debug\$(NetCoreAppToolCurrent)\publish\**"
TargetDir="WasmAppBuilder/"/>
<RunTimeDependencyCopyLocal
Include="$(RepoRoot)\src\tests\Common\wasm-test-runner\WasmTestRunner.proj"
TargetDir="wasm-test-runner/"/>
<RunTimeDependencyCopyLocal
Include="$(MonoProjectRoot)\wasm\test-main.js"
TargetDir="runtime-test/"/>
<RunTimeDependencyCopyLocal
Include="$(MonoProjectRoot)\wasm\build\*"
TargetDir="build/"/>
</ItemGroup>
<ItemGroup>
<RunTimeDependencyCopyLocal Include="$(CoreDisToolsLibrary)" Condition="$(CopyCoreDisToolsToCoreRoot)" />
</ItemGroup>
<ItemGroup Condition="'$(RuntimeFlavor)' == 'mono' and '$(IsDesktopOS)' == 'true' " >
<RuntimeDependencyCopyLocal Condition="'$(TargetOS)' != 'windows'" Include="$(MonoArtifactsPath)/libcoreclr$(LibSuffix)" TargetDir="" />
<RuntimeDependencyCopyLocal Condition="'$(TargetOS)' == 'windows'" Include="$(MonoArtifactsPath)coreclr$(LibSuffix)" TargetDir="" />
<RuntimeDependencyCopyLocal Include="$(MonoArtifactsPath)/libmono-component-*" TargetDir="" />
<RuntimeDependencyCopyLocal Include="$(MonoArtifactsPath)/*.dll" TargetDir="/" />
</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>
<!-- At this point Common test dependencies don't have any native components -->
<Target Name="CopyAllNativeProjectReferenceBinaries" />
</Project>