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

[ios] initial watch64_32 support #11691

Merged
merged 2 commits into from Jan 7, 2019
Merged

[ios] initial watch64_32 support #11691

merged 2 commits into from Jan 7, 2019

Conversation

lewurm
Copy link
Contributor

@lewurm lewurm commented Nov 15, 2018

$ file ios-targetwatch64_32-release/mono/mini/.libs/libmonosgen-2.0.dylib
ios-targetwatch64_32-release/mono/mini/.libs/libmonosgen-2.0.dylib: Mach-O dynamically linked shared library arm64_32_v8

Note, it doesn't add an AOT compiler yet.

Contributes to #10641


ios-target32_SYSROOT = $(ios_sysroot)
ios-target32s_SYSROOT = $(ios_sysroot)
ios-target64_SYSROOT = $(ios_sysroot)
ios-targettv_SYSROOT = $(tvos_sysroot)
ios-targetwatch_SYSROOT = $(watchos_sysroot)
ios-targetwatch64_32_SYSROOT = $(watchos5_sysroot)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not quite happy with the naming here: watch64_32 gonna need at least watchOS 5.0, which is different to what watch needs. Any suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest naming it simply watch64.

Copy link
Member

Choose a reason for hiding this comment

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

@vargaz what will you name it when Apple releases a watch that does plain arm64 then?

Copy link
Contributor

Choose a reason for hiding this comment

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

If that ever happens, we can rename it.

Copy link
Contributor

Choose a reason for hiding this comment

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

That'll be watch6464. :)

$(eval $(call iOSDeviceTemplate,target64,aarch64-apple-darwin10,arm64))
$(eval $(call iOSDeviceTemplate,targettv,aarch64-apple-darwin10,arm64))
$(eval $(call iOSDeviceTemplate,targetwatch,armv7k-apple-darwin10,armv7k))
$(eval $(call iOSDeviceTemplate,targetwatch64_32,aarch64-apple-darwin10_ilp32,arm64_32))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@luhenry is the archive target automatically going to pick up that new target?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The target fails on CI because it requires Xcode10, but we only have Xcode9 on the bots. So the answer is yes 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved by #12055

TARGET=ARM64;
arch_target=arm64
AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
sizeof_register=8
Copy link
Contributor

Choose a reason for hiding this comment

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

The define was renamed in another PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, fixed.


ios-target32_CPPFLAGS = -DHOST_IOS
ios-target32s_CPPFLAGS = -DHOST_IOS
ios-target64_CPPFLAGS = -DHOST_IOS
ios-targettv_CPPFLAGS = -DHOST_APPLETVOS -DTARGET_APPLETVOS
ios-targetwatch_CPPFLAGS = -DHOST_IOS -DHOST_WATCHOS
ios-targetwatch64_32_CPPFLAGS = -DHOST_IOS -DHOST_WATCHOS
Copy link
Member

Choose a reason for hiding this comment

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

Question related to the surrounding code instead of this PR: why does targettv_CPPFLAGS not define HOST_IOS when both the iOS and watchOS versions do? And why doesn't the iOS and watchOS variables define a TARGET_* variable when the tvOS one does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good question, I opened an issue: #11697

@lewurm
Copy link
Contributor Author

lewurm commented Nov 15, 2018

This doesn't work yet, as we need Xcode94 and Xcode10 on the bots. This requires changes in the build system so that Xcode94 is used for building 32bit macOS binaries, and Xcode10 otherwise.

The bots are already in order:
https://xamarinhq.slack.com/archives/C03CEMRFL/p1542299650611500

So the plan now is:
On bots

  • xam-mac-pro-2
  • xam-mac-pro-3
  • xam-mac-pro-4
  • xam-mac-pro-5

Do the following

  • Install Xcode 10.1 to /Applications/Xcode101.app
  • Rename /Applications/Xcode.app to /Applications/Xcode94.app
  • Symlink /Applications/Xcode.app -> /Applications/Xcode94.app
    (preserving Xcode 9.4 as the default Xcode)


ios-targettv_CFLAGS = -fembed-bitcode -fno-gnu-inline-asm
ios-targettv_CXXFLAGS = -fembed-bitcode -fno-gnu-inline-asm
ios-targetwatch_CFLAGS = -fembed-bitcode -fno-gnu-inline-asm
ios-targetwatch_CXXFLAGS = -fembed-bitcode -fno-gnu-inline-asm
ios-targetwatch64_32_CFLAGS = -fembed-bitcode -fno-gnu-inline-asm
5os-targetwatch64_32_CXXFLAGS = -fembed-bitcode -fno-gnu-inline-asm
Copy link
Member

Choose a reason for hiding this comment

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

This looks like typo

pull bot pushed a commit to keneanung/mono that referenced this pull request Dec 20, 2018
…it cross compilers. (mono#12055)

Forward port of mono#10139

Needed for arm64_32 (mono#11691): We still need to build AOT compilers that are 32bit, which is only possible with Xcode9. However, arm64_32 needs Xcode10.
@lewurm
Copy link
Contributor Author

lewurm commented Jan 2, 2019

ready to be reviewed & merged

@lewurm
Copy link
Contributor Author

lewurm commented Jan 3, 2019

@monojenkins build Windows x64

@luhenry luhenry merged commit 333ad86 into mono:master Jan 7, 2019
lewurm added a commit to lewurm/mono that referenced this pull request Jan 10, 2019
…it cross compilers. (mono#12055)

Forward port of mono#10139

Needed for arm64_32 (mono#11691): We still need to build AOT compilers that are 32bit, which is only possible with Xcode9. However, arm64_32 needs Xcode10.
lewurm added a commit to lewurm/mono that referenced this pull request Jan 10, 2019
* [ios] initial watch64_32 support

* align iOSSimulatorTemplate with iOSDeviceTemplate
@lewurm
Copy link
Contributor Author

lewurm commented Jan 16, 2019

@monojenkins backport 2018-10
@monojenkins backport 2018-12

@monojenkins
Copy link
Contributor

@lewurm backporting to 2018-10 failed, the patch results in conflicts:

Applying: [ios] initial watch64_32 support
Using index info to reconstruct a base tree...
M	configure.ac
M	mono/utils/mono-context.h
M	sdks/builds/ios.mk
M	sdks/versions.mk
Falling back to patching base and 3-way merge...
Auto-merging sdks/versions.mk
Auto-merging sdks/builds/ios.mk
CONFLICT (content): Merge conflict in sdks/builds/ios.mk
Auto-merging mono/utils/mono-context.h
Auto-merging configure.ac
error: Failed to merge in the changes.
Patch failed at 0001 [ios] initial watch64_32 support

Please backport manually!

lewurm added a commit to lewurm/mono that referenced this pull request Jan 16, 2019
…it cross compilers. (mono#12055)

Forward port of mono#10139

Needed for arm64_32 (mono#11691): We still need to build AOT compilers that are 32bit, which is only possible with Xcode9. However, arm64_32 needs Xcode10.
lewurm added a commit to lewurm/mono that referenced this pull request Jan 16, 2019
* [ios] initial watch64_32 support

* align iOSSimulatorTemplate with iOSDeviceTemplate
lewurm added a commit to lewurm/mono that referenced this pull request Jan 16, 2019
* [ios] initial watch64_32 support

* align iOSSimulatorTemplate with iOSDeviceTemplate
lewurm added a commit to lewurm/mono that referenced this pull request Jan 16, 2019
…it cross compilers. (mono#12055)

Forward port of mono#10139

Needed for arm64_32 (mono#11691): We still need to build AOT compilers that are 32bit, which is only possible with Xcode9. However, arm64_32 needs Xcode10.
lewurm added a commit to lewurm/mono that referenced this pull request Jan 16, 2019
* [ios] initial watch64_32 support

* align iOSSimulatorTemplate with iOSDeviceTemplate
monojenkins pushed a commit that referenced this pull request Jan 16, 2019
[2018-10] [ios] arm64_32 build support

Backport of #11652, #12055 and #11691

Heads up: This will require changes to `xamarin-macios` regarding setting the XCODE location. I'll handle that for the XI 2018-10 integration branch when this is merged.
marek-safar pushed a commit that referenced this pull request Jan 17, 2019
…it cross compilers. (#12055)

Forward port of #10139

Needed for arm64_32 (#11691): We still need to build AOT compilers that are 32bit, which is only possible with Xcode9. However, arm64_32 needs Xcode10.
marek-safar pushed a commit that referenced this pull request Jan 17, 2019
* [ios] initial watch64_32 support

* align iOSSimulatorTemplate with iOSDeviceTemplate
lewurm added a commit that referenced this pull request Jan 23, 2019
* [ios] initial watch64_32 support

* align iOSSimulatorTemplate with iOSDeviceTemplate
lewurm added a commit that referenced this pull request Jan 23, 2019
…it cross compilers. (#12055)

Forward port of #10139

Needed for arm64_32 (#11691): We still need to build AOT compilers that are 32bit, which is only possible with Xcode9. However, arm64_32 needs Xcode10.
lewurm added a commit to lewurm/mono that referenced this pull request Jan 23, 2019
* [ios] initial watch64_32 support

* align iOSSimulatorTemplate with iOSDeviceTemplate
lewurm added a commit to lewurm/mono that referenced this pull request Jan 23, 2019
…it cross compilers. (mono#12055)

Forward port of mono#10139

Needed for arm64_32 (mono#11691): We still need to build AOT compilers that are 32bit, which is only possible with Xcode9. However, arm64_32 needs Xcode10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants