-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix MacCatalyst .framework build #84858
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
Conversation
eng/native/functions.cmake
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this since it was confusing to have the "Stripping" message printed after we're done stripping
This got broken by dotnet#83903 and wasn't noticed on the PR because we don't build .frameworks unless you pass `/p:BuildDarwinFrameworks=true`. For .frameworks we need to use a different install command and we also don't need to codesign them, it actually causes an error trying to do so: > /Users/alexander/dev/runtime/artifacts/obj/mono/maccatalyst.x64.Release/mono/mini/Mono.release.framework/Versions/C/Mono.release: code object is not signed at all > In subcomponent: /Users/alexander/dev/runtime/artifacts/obj/mono/maccatalyst.x64.Release/mono/mini/Mono.release.framework/Versions/C/Mono.release.dwarf
9bb0aa7 to
2722e7a
Compare
| string(TOLOWER "${CMAKE_BUILD_TYPE}" LOWERCASE_CMAKE_BUILD_TYPE) | ||
| if (LOWERCASE_CMAKE_BUILD_TYPE STREQUAL release) | ||
| set(strip_command ${strip_command} && codesign -f -s - ${strip_source_file}) | ||
| if (CLR_CMAKE_TARGET_OSX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps just:
| if (CLR_CMAKE_TARGET_OSX) | |
| if (NOT CLR_CMAKE_TARGET_MACCATALYST) |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only other targets are iOS/tvOS and it doesn't make much sense to codesign there either since that will be done during the app build. we've also not done this in the mono.proj version before you change so I think it's fine to limit it to OSX.
This got broken by #83903 and wasn't noticed on the PR because we don't build .frameworks unless you pass
/p:BuildDarwinFrameworks=true.For .frameworks we need to use a different install command and we also don't need to codesign them, it actually causes an error trying to do so (only on Catalyst though, not on iOS/tvOS for some reason):
/cc @am11