Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,13 @@
</PropertyGroup>

<PropertyGroup>
<!-- Embed IBC data on Windows release builds, if IBCMerge isn't available this will just log the commandline -->
<EnablePartialNgenOptimization Condition="'$(EnablePartialNgenOptimization)' == '' and '$(OS)' == 'Windows_NT' and '$(ConfigurationGroup)' == 'Release'">true</EnablePartialNgenOptimization>
<!-- Embed IBC data on release builds, if IBCMerge isn't available this will just log the commandline -->
<EnablePartialNgenOptimization Condition="'$(EnablePartialNgenOptimization)' == '' and '$(ConfigurationGroup)' == 'Release'">true</EnablePartialNgenOptimization>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MichalStrehovsky, were you also planning to switch this to full NGEN and then mark individual assemblies as partial in core-setup?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's doing full NGen since #36450. EnablePartialNGenOptimization wasn't doing anything since dotnet/arcade#2198 (the way it evaluates EnablePartialNGenOptimization makes that a no-op in CoreFX). I'll rename this property a subsequent pull request.


<WindowsCoreFxOptimizationDataPackageId>optimization.windows_nt-x64.IBC.CoreFx</WindowsCoreFxOptimizationDataPackageId>
<WindowsCoreFxOptimizationDataVersion>$(optimizationwindows_ntx64IBCCoreFxPackageVersion)</WindowsCoreFxOptimizationDataVersion>
<LinuxCoreFxOptimizationDataPackageId>optimization.linux-x64.IBC.CoreFx</LinuxCoreFxOptimizationDataPackageId>
<LinuxCoreFxOptimizationDataVersion>$(optimizationwindows_ntx64IBCCoreFxPackageVersion)</LinuxCoreFxOptimizationDataVersion>
</PropertyGroup>

<!-- Set up Default symbol and optimization for Configuration -->
Expand Down
6 changes: 5 additions & 1 deletion eng/codeOptimization.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<Target Name="SetApplyNgenOptimization"
Condition="'$(IsEligibleForNgenOptimization)' == 'true'"
BeforeTargets="CoreCompile">
<PropertyGroup>
<IbcOptimizationDataDir Condition="'$(OSGroup)' == 'Unix' or '$(OSGroup)' == 'Linux'">$(IbcOptimizationDataDir)$(LinuxCoreFxOptimizationDataPackageId)\</IbcOptimizationDataDir>
<IbcOptimizationDataDir Condition="'$(OSGroup)' != 'Unix' and '$(OSGroup)' != 'Linux'">$(IbcOptimizationDataDir)$(WindowsCoreFxOptimizationDataPackageId)\</IbcOptimizationDataDir>
</PropertyGroup>
<ItemGroup>
<_optimizationDataAssembly Include="$(IbcOptimizationDataDir)**\$(TargetFileName)" />
</ItemGroup>
Expand All @@ -17,4 +21,4 @@
</PropertyGroup>
</Target>

</Project>
</Project>
7 changes: 2 additions & 5 deletions external/optimizationData/optimizationData.depproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
<!-- Copy to IBC directory -->
<OutputPath>$(IbcOptimizationDataDir)</OutputPath>
<EnableBinPlacing>false</EnableBinPlacing>

<CoreFxOptimizationDataPackageId>optimization.windows_nt-x64.IBC.CoreFx</CoreFxOptimizationDataPackageId>
<CoreFxOptimizationDataPackageId Condition="'$(IBCTarget)'=='Linux'">optimization.linux-x64.IBC.CoreFx</CoreFxOptimizationDataPackageId>
<CoreFxOptimizationDataVersion>$(optimizationwindows_ntx64IBCCoreFxPackageVersion)</CoreFxOptimizationDataVersion>
</PropertyGroup>
<ItemGroup>
<!-- IBC data -->
<IBCPackage Include="$(CoreFxOptimizationDataPackageId)" Version="$(CoreFxOptimizationDataVersion)" />
<IBCPackage Include="$(WindowsCoreFxOptimizationDataPackageId)" Version="$(WindowsCoreFxOptimizationDataVersion)" />
<IBCPackage Include="$(LinuxCoreFxOptimizationDataPackageId)" Version="$(LinuxCoreFxOptimizationDataVersion)" />
<PackageReference Include="@(IBCPackage)" GeneratePathProperty="true" />
</ItemGroup>

Expand Down