forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codeOptimization.targets
24 lines (21 loc) · 1.31 KB
/
codeOptimization.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
<Project>
<PropertyGroup Condition="'$(IsEligibleForNgenOptimization)' == ''">
<IsEligibleForNgenOptimization>true</IsEligibleForNgenOptimization>
<IsEligibleForNgenOptimization Condition="'$(IsReferenceAssembly)' == 'true'">false</IsEligibleForNgenOptimization>
<IsEligibleForNgenOptimization Condition="'$(GeneratePlatformNotSupportedAssembly)' == 'true' or '$(GeneratePlatformNotSupportedAssemblyMessage)' != ''">false</IsEligibleForNgenOptimization>
</PropertyGroup>
<Target Name="SetApplyNgenOptimization"
Condition="'$(IsEligibleForNgenOptimization)' == 'true'"
BeforeTargets="CoreCompile">
<PropertyGroup>
<IbcOptimizationDataDir Condition="'$(OSGroup)' == 'Unix' or '$(OSGroup)' == 'Linux'">$(IbcOptimizationDataDir)$(LinuxCoreFxOptimizationDataPackage)\</IbcOptimizationDataDir>
<IbcOptimizationDataDir Condition="'$(OSGroup)' != 'Unix' and '$(OSGroup)' != 'Linux'">$(IbcOptimizationDataDir)$(WindowsCoreFxOptimizationDataPackage)\</IbcOptimizationDataDir>
</PropertyGroup>
<ItemGroup>
<_optimizationDataAssembly Include="$(IbcOptimizationDataDir)**\$(TargetFileName)" />
</ItemGroup>
<PropertyGroup>
<ApplyNgenOptimization Condition="'@(_optimizationDataAssembly)' != ''">full</ApplyNgenOptimization>
</PropertyGroup>
</Target>
</Project>