forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runtime.proj
64 lines (56 loc) · 4.43 KB
/
runtime.proj
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
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<NativeBuildPartitionPropertiesToRemove>ClrFullNativeBuild;ClrRuntimeSubset;ClrJitSubset;ClrPalTestsSubset;ClrAllJitsSubset;ClrILToolsSubset;ClrNativeAotSubset;ClrSpmiSubset;ClrCrossComponentsSubset;HostArchitecture;PgoInstrument;NativeOptimizationDataSupported;CMakeArgs</NativeBuildPartitionPropertiesToRemove>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="runtime-prereqs.proj" GlobalPropertiesToRemove="$(NativeBuildPartitionPropertiesToRemove)" />
</ItemGroup>
<Import Project="$(RepositoryEngineeringDir)nativepgo.targets" />
<Target Name="BuildRuntime"
DependsOnTargets="GetPgoDataPackagePath"
BeforeTargets="Build">
<ItemGroup>
<_CoreClrBuildArg Condition="'$(TargetArchitecture)' != ''" Include="-$(TargetArchitecture)" />
<_CoreClrBuildArg Condition="'$(CMakeArgs)' != ''" Include="-cmakeargs "$(CMakeArgs)"" />
<_CoreClrBuildArg Include="-$(Configuration.ToLower())" />
<_CoreClrBuildArg Include="$(Compiler)" />
<_CoreClrBuildArg Condition="'$(ConfigureOnly)' == 'true'" Include="-configureonly" />
<_CoreClrBuildArg Condition="'$(ContinuousIntegrationBuild)' == 'true'" Include="-ci" />
<_CoreClrBuildArg Condition="'$(CrossBuild)' == 'true'" Include="-cross" />
<_CoreClrBuildArg Condition="'$(PortableBuild)' != 'true'" Include="-portablebuild=false" />
<_CoreClrBuildArg Condition="'$(KeepNativeSymbols)' != 'false'" Include="-keepnativesymbols" />
<_CoreClrBuildArg Include="-os $(TargetOS)" />
<_CoreClrBuildArg Condition="$([MSBuild]::IsOsPlatform(Windows)) and
('$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'x64') and
'$(Configuration)' == 'Release' and
'$(ClrRuntimeSubset)' == 'true' and
'$(NativeOptimizationDataSupported)' == 'true' and
'$(PgoInstrument)' != 'true'"
Include="-enforcepgo" />
<_CoreClrBuildArg Condition="'$(Ninja)' == 'true' and !$([MSBuild]::IsOsPlatform(Windows))" Include="-ninja" />
<_CoreClrBuildArg Condition="'$(Ninja)' == 'false' and $([MSBuild]::IsOsPlatform(Windows))" Include="-msbuild" />
<_CoreClrBuildArg Condition="'$(PgoInstrument)' == 'true'" Include="-pgoinstrument" />
<_CoreClrBuildArg Condition="'$(NativeOptimizationDataSupported)' == 'true' and '$(NoPgoOptimize)' != 'true' and '$(PgoInstrument)' != 'true'" Include="-pgodatapath "$(PgoPackagePath)"" />
<_CoreClrBuildArg Condition="'$(HostArchitecture)' != ''" Include="-hostarch $(HostArchitecture)" />
</ItemGroup>
<ItemGroup Condition="'$(ClrFullNativeBuild)' != 'true'">
<_CoreClrBuildArg Condition="'$(ClrHostsSubset)' == 'true'" Include="-component hosts" />
<_CoreClrBuildArg Condition="'$(ClrRuntimeSubset)' == 'true'" Include="-component runtime" />
<_CoreClrBuildArg Condition="'$(ClrJitSubset)' == 'true'" Include="-component jit" />
<_CoreClrBuildArg Condition="'$(ClrPalTestsSubset)' == 'true'" Include="-component paltests" />
<_CoreClrBuildArg Condition="'$(ClrAllJitsSubset)' == 'true'" Include="-component alljits" />
<_CoreClrBuildArg Condition="'$(ClrILToolsSubset)' == 'true'" Include="-component iltools" />
<_CoreClrBuildArg Condition="'$(ClrNativeAotSubset)' == 'true'" Include="-component nativeaot" />
<_CoreClrBuildArg Condition="'$(ClrSpmiSubset)' == 'true'" Include="-component spmi" />
<_CoreClrBuildArg Condition="'$(ClrCrossComponentsSubset)' == 'true'" Include="-component crosscomponents" />
</ItemGroup>
<PropertyGroup>
<_CoreClrBuildScript Condition="$([MSBuild]::IsOsPlatform(Windows))">build-runtime.cmd</_CoreClrBuildScript>
<_CoreClrBuildScript Condition="!$([MSBuild]::IsOsPlatform(Windows))">build-runtime.sh</_CoreClrBuildScript>
</PropertyGroup>
<!-- Use IgnoreStandardErrorWarningFormat because Arcade sets WarnAsError and there's an existing warning in the native build. -->
<Message Text="Executing "$(MSBuildThisFileDirectory)$(_CoreClrBuildScript)" @(_CoreClrBuildArg->'%(Identity)',' ')" Importance="High" />
<Exec Command=""$(MSBuildThisFileDirectory)$(_CoreClrBuildScript)" @(_CoreClrBuildArg->'%(Identity)',' ')"
IgnoreStandardErrorWarningFormat="true" />
</Target>
</Project>