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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kotlarmilos
Copy link
Member

Description

This PR re-enables the trimming of library tests on Apple mobile platforms. This change prevents the default setting of DynamicCodeSupport=true from ILLink targets that are imported. The regression was introduced in #103594.

With this change, the issue mentioned in #82637 has been mitigated. The tracking issue will remain open as there are separate reliability-related problems that still need to be addressed.

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link
Contributor

Tagging subscribers to this area: @directhex, @matouskozak
See info in area-owners.md if you want to be subscribed.

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -39,8 +39,7 @@ jobs:
${{ if eq(variables['isRollingBuild'], true) }}:
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true /p:EnableAggressiveTrimming=false
${{ else }}:
# Tracking issue: https://github.com/dotnet/runtime/issues/82637
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true /p:EnableAggressiveTrimming=false
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true /p:EnableAggressiveTrimming=true
Copy link
Member

Choose a reason for hiding this comment

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

Since our iOS/tvOS builds are trimming on Helix by default, to prevent future hard-to-detect issues on CI, I would suggest that we add a trigger on changes in the tools_illink subset.

Copy link
Member Author

Choose a reason for hiding this comment

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

Great idea!

@@ -1008,8 +1008,7 @@ extends:
jobParameters:
testGroup: innerloop
nameSuffix: AllSubsets_Mono
# Tracking issue: https://github.com/dotnet/runtime/issues/82637
buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:EnableAggressiveTrimming=false
buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:EnableAggressiveTrimming=true
Copy link
Member

Choose a reason for hiding this comment

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

Same as above.

@@ -12,6 +12,8 @@
<!-- Forced by ILLink targets -->
<SelfContained>true</SelfContained>
<PublishDir>$(OriginalPublishDir)</PublishDir>
<!-- Prevent getting DynamicCodeSupport=true default from ILLink targets that are imported with the Sdk.targets -->
<DynamicCodeSupport>false</DynamicCodeSupport>
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch! These are difficult to detect when something goes wrong at runtime.

Copy link
Member

Choose a reason for hiding this comment

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

I was under the impression we'd only do AOT on helix, not actual trimming. @steveisok how does this work?

Copy link
Member

@akoeplinger akoeplinger Jun 28, 2024

Choose a reason for hiding this comment

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

The new default for the property should affect many more cases than just AOT on helix so this doesn't sounds like the correct place for this fix.

Copy link
Member

Choose a reason for hiding this comment

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

I was under the impression we'd only do AOT on helix, not actual trimming. @steveisok how does this work?

If you want trimming + AOT on helix, both have to occur in the same place. Otherwise, you have to send individual copies of the trimmed shared framework for each test from the build machine.

Copy link
Member

Choose a reason for hiding this comment

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

That might not be as painful as it seemed initially.

Copy link
Member Author

Choose a reason for hiding this comment

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

@akoeplinger Since we perform trimming on Helix, we can move this to the Directory.Build.props file. However, it will not have effect on other components.

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants