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

Fix static-lib AOT Mono builds #103988

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

jkoritzinsky
Copy link
Member

Fixes #103982

@jkoritzinsky
Copy link
Member Author

@kotlarmilos what pipeline should I run to ensure I'm getting good coverage here?

@kotlarmilos
Copy link
Member

/azp run runtime-ioslike

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member

@kotlarmilos what pipeline should I run to ensure I'm getting good coverage here?

*_RuntimeTests should provide good coverage for this fix. Please ignore the library tests on Apple mobile as this is an ongoing issue.

@jkoritzinsky
Copy link
Member Author

Looks like it's working. I'll mark this ready for review.

@kotlarmilos
Copy link
Member

/azp run runtime-ioslikesimulator

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member

@@ -231,7 +231,9 @@ if (ENABLE_PERFTRACING AND "${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}" IN_LIST
list(APPEND mono-components-objects $<TARGET_OBJECTS:eventpipe-mono-objects> $<TARGET_OBJECTS:dn-containers>)
endif()
if (TARGET mono-component-${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-static)
target_sources(mono-component-${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-static PRIVATE $<TARGET_OBJECTS:eventpipe-mono-objects> $<TARGET_OBJECTS:dn-containers>)
# We don't add dn-containers here as any scenario that uses this target will also use the monosgen-static target,
Copy link
Member

Choose a reason for hiding this comment

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

@akoeplinger do you recall if that's true even for simulator?

Copy link
Member

Choose a reason for hiding this comment

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

I think so, yes

@kotlarmilos
Copy link
Member

This fix resolves the device failure caused by symbol duplication. However, simulators are still encountering a different issue. Looking at logs between device and simulator, I noticed the following difference:

<MonoComponentsStatic Condition="'$(TargetsiOS)' == 'true' and '$(TargetsiOSSimulator)' != 'true' and '$(MonoComponentsStatic)' == ''">true</MonoComponentsStatic>
<MonoComponentsStatic Condition="'$(TargetstvOS)' == 'true' and '$(TargetstvOSSimulator)' != 'true' and '$(MonoComponentsStatic)' == ''">true</MonoComponentsStatic>
<MonoComponentsStatic Condition="'$(TargetsiOS)' == 'true' and '$(TargetsiOSSimulator)' == 'true' and '$(MonoComponentsStatic)' == ''">false</MonoComponentsStatic>
<MonoComponentsStatic Condition="'$(TargetstvOS)' == 'true' and '$(TargetstvOSSimulator)' == 'true' and '$(MonoComponentsStatic)' == ''">false</MonoComponentsStatic>

<_MonoCMakeArgs Include="-DDISABLE_LINK_STATIC_COMPONENTS=1" Condition="!('$(TargetsiOSSimulator)' == 'true' or '$(TargetstvOSSimulator)' == 'true')"/>

@akoeplinger Could we align these params for the device and simulator?

@jkoritzinsky
Copy link
Member Author

The simulator failures are only when building the Mono.debug.framework and Mono.release.framework frameworks.

I'm doing my best to investigate, but I don't have a Mac available today.

@jkoritzinsky
Copy link
Member Author

/azp run runtime-ioslike, runtime-ioslikesimulator

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@jkoritzinsky
Copy link
Member Author

/ba-g Failure is an AzDO infra issue

@jkoritzinsky jkoritzinsky merged commit f4b981c into dotnet:main Jul 1, 2024
85 of 95 checks passed
@jkoritzinsky jkoritzinsky deleted the static-components-aot branch July 1, 2024 21:56
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Runtime tests fail to AOT compile on Apple mobile platforms
4 participants