Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable trimming of library tests on Apple mobile #104097

Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Set the actual feature switch properties instead of RuntimeHostConfig…
…urationOptio
kotlarmilos committed Nov 6, 2024
commit e3588f4f55264cccde625d975fecad31cc19f925
8 changes: 3 additions & 5 deletions eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
@@ -38,6 +38,9 @@
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == ''">false</HttpActivityPropagationSupport>
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == ''">false</UseSystemResourceKeys>
<UseNativeHttpHandler Condition="'$(UseNativeHttpHandler)' == ''">false</UseNativeHttpHandler>
<DynamicCodeSupport Condition="'$(DynamicCodeSupport)' == '' and '$(MonoForceInterpreter)' != 'true'">false</DynamicCodeSupport>
<_DefaultValueAttributeSupport Condition="'$(_DefaultValueAttributeSupport)' == ''">true</_DefaultValueAttributeSupport>
<_DesignerHostSupport Condition="'$(_DesignerHostSupport)' == ''">true</_DesignerHostSupport>
Copy link
Member

Choose a reason for hiding this comment

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

FWIW
I think these need to be in a separate property group as I believe BuildTestsOnHelix=true in our setup.
So based on my previous comment, I think we will need a new property group conditioned with '$(EnableAggressiveTrimming)' == 'true' and '$(BuildTestsOnHelix)' == 'true' and then add these switches there.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I missed the condition.

</PropertyGroup>

<!-- When trimming non-exe projects, root the whole intermediate assembly.
@@ -99,11 +102,6 @@
<!-- Mark all the assemblies for link. We will explicitly mark the non-trimmable ones -->
<ResolvedFileToPublish TrimMode="$(TrimMode)" />

<!-- Prevent getting defaults from ILLink targets that are imported with the Sdk.targets -->
<RuntimeHostConfigurationOption Include="System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported" Value="false" />
<RuntimeHostConfigurationOption Include="System.ComponentModel.DefaultValueAttribute.IsSupported" Value="true" />
<RuntimeHostConfigurationOption Include="System.ComponentModel.Design.IDesignerHost.IsSupported" Value="true" />

<!-- Don't trim the main assembly.
TrimMode="" is needed so the root assemblies are correctly identified -->
<ResolvedFileToPublish TrimMode="" Condition="'%(FileName)' == '$(AssemblyName)'" />
5 changes: 0 additions & 5 deletions src/mono/msbuild/apple/build/AppleBuild.LocalBuild.targets
Original file line number Diff line number Diff line change
@@ -47,11 +47,6 @@
<!-- Mark all the assemblies for link. We will explicitly mark the non-trimmable ones -->
<AppleAssembliesToBundle TrimMode="$(TrimMode)" />

<!-- Prevent getting defaults from ILLink targets that are imported with the Sdk.targets -->
<RuntimeHostConfigurationOption Include="System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported" Value="false" />
<RuntimeHostConfigurationOption Include="System.ComponentModel.DefaultValueAttribute.IsSupported" Value="true" />
<RuntimeHostConfigurationOption Include="System.ComponentModel.Design.IDesignerHost.IsSupported" Value="true" />

<!-- Don't trim the main assembly.
TrimMode="" is needed so the root assemblies are correctly identified -->
<AppleAssembliesToBundle TrimMode="" Condition="'%(FileName)' == '$(AssemblyName)'" />