forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexternals.csproj
131 lines (116 loc) · 7.3 KB
/
externals.csproj
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
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<SwapNativeForIL Condition="'$(SwapNativeForIL)' == '' and ('$(Configuration)' == 'Debug' or '$(Coverage)' == 'true') and '$(RuntimeFlavor)' != 'Mono'">true</SwapNativeForIL>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<!-- Binplace properties -->
<BinPlaceForTargetVertical>false</BinPlaceForTargetVertical>
<BinPlaceNative>true</BinPlaceNative>
<BinPlaceRuntime>false</BinPlaceRuntime>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<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>
</PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)coredistools.targets" Condition="$(CopyCoreDisToolsToCoreRoot)" />
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.DiaSymReader.Native"
Version="$(MicrosoftDiaSymReaderNativeVersion)" />
</ItemGroup>
<ItemGroup>
<HostFxrFile Include="$(DotNetHostBinDir)$(LibPrefix)hostfxr$(LibSuffix)" />
<HostPolicyFile Include="$(DotNetHostBinDir)$(LibPrefix)hostpolicy$(LibSuffix)" />
<DotnetExe Include="$(DotNetHostBinDir)dotnet$(ExeSuffix)" />
</ItemGroup>
<!-- Setup the testing shared framework host -->
<Target Name="SetupTestingHost"
AfterTargets="AfterResolveReferences"
Condition="Exists('$(DotNetHostBinDir)') and '$(TestNativeAot)' != 'true'">
<PropertyGroup>
<UseHardlink>true</UseHardlink>
</PropertyGroup>
<!-- We do not need apphost.exe.
Exclude here so that when building with the 2.x SDK we don't place it in the test shared framework. -->
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(Filename)' == 'apphost'" />
</ItemGroup>
<Copy SourceFiles="@(HostFxrFile)"
DestinationFolder="$(NetCoreAppCurrentTestHostPath)host\fxr\$(ProductVersion)"
SkipUnchangedFiles="true"
UseHardlinksIfPossible="$(UseHardlink)" />
<Copy SourceFiles="@(HostPolicyFile)"
DestinationFolder="$(NetCoreAppCurrentTestHostPath)shared\Microsoft.NETCore.App\$(ProductVersion)"
SkipUnchangedFiles="true"
UseHardlinksIfPossible="$(UseHardlink)" />
<Copy SourceFiles="@(DotnetExe)"
DestinationFolder="$(NetCoreAppCurrentTestHostPath)"
SkipUnchangedFiles="true"
UseHardlinksIfPossible="$(UseHardlink)" />
<!-- Include any native sanitizer runtimes so we can run our tests on machines without the exact same development environment. -->
<Copy SourceFiles="@(SanitizerRuntimeToCopy->'$(DotNetHostBinDir)%(Identity)')"
DestinationFolder="$(NetCoreAppCurrentTestHostPath)"
SkipUnchangedFiles="true"
UseHardlinksIfPossible="$(UseHardlink)" />
<Copy Condition="$(CopyCoreDisToolsToCoreRoot)"
SourceFiles="$(CoreDisToolsLibrary)"
DestinationFolder="$(NetCoreAppCurrentTestHostPath)shared\Microsoft.NETCore.App\$(ProductVersion)"
SkipUnchangedFiles="true"
UseHardlinksIfPossible="$(UseHardlink)" />
<Exec Command="chmod +x $(NetCoreAppCurrentTestHostPath)%(DotnetExe.Filename)%(DotnetExe.Extension)" Condition="'$(TargetOS)' != 'windows' and '$(OS)' != 'Windows_NT'"/>
</Target>
<Target Name="OverrideRuntimeCoreCLR"
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild"
AfterTargets="AfterResolveReferences"
Condition="'$(RuntimeFlavor)' != 'Mono' and '$(UseNativeAotCoreLib)' != 'true'">
<ItemGroup>
<RuntimeFiles Include="@(HostFxrFile)" Condition="Exists('@(HostFxrFile)')" />
<RuntimeFiles Include="@(HostPolicyFile)" Condition="Exists('@(HostPolicyFile)')" />
<!-- CoreRun is not used for testing anymore, but we still use it for benchmarking and profiling -->
<RuntimeFiles Include="$(CoreCLRArtifactsPath)\corerun*" />
<RuntimeFiles Include="$(CoreCLRArtifactsPath)\PDB\corerun*" />
<!-- Include cDAC reader library
TODO: [cdac] Remove once cdacreader is added to shipping shared framework -->
<RuntimeFiles Include="$(CoreCLRArtifactsPath)\*cdacreader*" />
<RuntimeFiles Include="$(CoreCLRArtifactsPath)\PDB\*cdacreader*" />
</ItemGroup>
<!-- If the build has native sanitizers, copy over the non-sanitized diagnostic binaries so they can be loaded by a debugger -->
<ItemGroup Condition="'$(EnableNativeSanitizers)' != ''">
<RuntimeFiles Remove="$(CoreCLRArtifactsPath)\sharedFramework\*mscordaccore*" />
<RuntimeFiles Remove="$(CoreCLRArtifactsPath)\sharedFramework\*mscordbi*" />
<RuntimeFiles Remove="$(CoreCLRArtifactsPath)\sharedFramework\PDB\*mscordaccore*" />
<RuntimeFiles Remove="$(CoreCLRArtifactsPath)\sharedFramework\PDB\*mscordbi*" />
<RuntimeFiles Include="$(CoreCLRArtifactsPath)\unsanitized\sharedFramework\*" IsNative="true" />
<RuntimeFiles Include="$(CoreCLRArtifactsPath)\unsanitized\PDB\*mscordaccore*" IsNative="true" />
<RuntimeFiles Include="$(CoreCLRArtifactsPath)\unsanitized\PDB\*mscordbi*" IsNative="true" />
</ItemGroup>
<ItemGroup>
<ReferenceCopyLocalPaths Include="@(RuntimeFiles)" />
</ItemGroup>
<ItemGroup Condition="'$(SwapNativeForIL)' == 'true'">
<CoreCLRILFiles Include="$(CoreCLRArtifactsPath)\IL\*.*" />
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'@(CoreCLRILFiles->'%(FileName)%(Extension)')' == '%(FileName)%(Extension)'" />
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'@(CoreCLRILFiles->'%(FileName).ni%(Extension)')' == '%(FileName)%(Extension)'" />
<ReferenceCopyLocalPaths Include="@(CoreCLRILFiles)" />
</ItemGroup>
<Error Condition="'$(SwapNativeForIL)' == 'true' and '@(CoreCLRILFiles)' == ''" Text="Could not locate CoreCLR IL files." />
</Target>
<Target Name="OverrideRuntimeMono"
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild"
AfterTargets="AfterResolveReferences"
Condition="'$(RuntimeFlavor)' == 'Mono'">
<ItemGroup>
<!-- copy the host files to make the desktop samples work -->
<RuntimeFiles Include="@(HostFxrFile)" Condition="Exists('@(HostFxrFile)') and '$(TargetsMobile)' != 'true'"/>
<RuntimeFiles Include="@(HostPolicyFile)" Condition="Exists('@(HostPolicyFile)') and '$(TargetsMobile)' != 'true'" />
<ReferenceCopyLocalPaths Include="@(RuntimeFiles)" />
<!-- Setup runtime pack native. -->
<ReferenceCopyLocalPaths Include="@(MonoCrossFiles)"
DestinationSubDirectory="cross/%(RecursiveDir)" />
<ReferenceCopyLocalPaths Include="@(MonoIncludeFiles)"
DestinationSubDirectory="include/%(RecursiveDir)" />
</ItemGroup>
</Target>
</Project>