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

[Mono] Add osx aot offsets & generate aot compiler packs for x64 and arm64 #55506

Closed
wants to merge 3 commits into from

Conversation

steveisok
Copy link
Member

Since Xam.mac can toggle between runtimes, it may make sense to provide an AOT option when using mono.

@ghost
Copy link

ghost commented Jul 12, 2021

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

Issue Details

Since Xam.mac can toggle between runtimes, it may make sense to provide an AOT option when using mono.

Author: steveisok
Assignees: -
Labels:

area-Infrastructure-mono

Milestone: -

@@ -119,7 +119,11 @@ if(NOT AOT_TARGET_TRIPLE STREQUAL "")
set(MONO_OFFSETS_FILE "${AOT_OFFSETS_FILE}")
endif()
if(AOT_TARGET_TRIPLE STREQUAL "x86_64-apple-darwin10")
set(TARGET_SYSTEM_NAME "iOS")
if(REAL_TARGET_OS STREQUAL "osx")

This comment was marked as resolved.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if we need it. I was trying to fit within what was there and it felt weird to set the TARGET_SYSTEM_NAME to iOS when I know it should be Darwin

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I am misreading what is happening. We set AOT_TARGET_TRIPLE from the outside. And then that sets TARGET_SYSTEM_NAME and then TARGET_SYSTEM_NAME is used to set other target properties. So it's not redundant. The triple is the source of truth.

It's unfortunate that we use the same triple for ios and mac. Did we do that in mono/mono, too? @vargaz ?

Copy link
Contributor

Choose a reason for hiding this comment

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

We has no cross compiler to osx previously, probably just used the normal host mono. If we need it, it should use a separate triple.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there anything you would suggest?

Copy link
Contributor

Choose a reason for hiding this comment

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

Something like x86_64-apple-macos

Copy link
Member

Choose a reason for hiding this comment

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

according to https://reviews.llvm.org/D40998 they use x86_64-apple-macosx (note the x at the end) for clang's -target but if I understand correctly we're not passing the triple down to clang here so this is just for us?

# MacOS
elif "aarch64-apple-darwin20" == args.abi:
require_sysroot (args)
self.target = Target ("TARGET_ARM64", "TARGET_OSX", IOS_DEFINES)
Copy link
Member

Choose a reason for hiding this comment

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

IOS_DEFINES sounds a bit weird here if we're using it for macOS too. We should probably rename it to APPLE_DEFINES. Also if we're using a different AOT_TARGET_TRIPLE for macOS then we need to also add the case for x86_64 here that is covered by the iOS case on L149 now.

@@ -119,7 +119,11 @@ if(NOT AOT_TARGET_TRIPLE STREQUAL "")
set(MONO_OFFSETS_FILE "${AOT_OFFSETS_FILE}")
endif()
if(AOT_TARGET_TRIPLE STREQUAL "x86_64-apple-darwin10")
set(TARGET_SYSTEM_NAME "iOS")
if(REAL_TARGET_OS STREQUAL "osx")
Copy link
Member

Choose a reason for hiding this comment

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

according to https://reviews.llvm.org/D40998 they use x86_64-apple-macosx (note the x at the end) for clang's -target but if I understand correctly we're not passing the triple down to clang here so this is just for us?

@steveisok steveisok closed this Aug 31, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Sep 30, 2021
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.

4 participants