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

System.Native: eng/native/tryrun.cmake host/target confusion #89039

Open
lambdageek opened this issue Jul 17, 2023 · 3 comments
Open

System.Native: eng/native/tryrun.cmake host/target confusion #89039

lambdageek opened this issue Jul 17, 2023 · 3 comments
Assignees
Milestone

Comments

@lambdageek
Copy link
Member

When doing an android-x86 build on an osx-arm64 machine, during ./build.sh --os android -arch x86, we end up here during the System.Native build

message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm64 or x64 is supported for OSX cross build!")

This is the else case for

if(DARWIN)
if(TARGET_ARCH_NAME MATCHES "^(arm64|x64)$")

This seems wrong - DARWIN is the host machine (osx-arm64), arm64|x64 is checking the target architecture

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 17, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 17, 2023
@lambdageek
Copy link
Member Author

lambdageek commented Jul 17, 2023

Note that ./build.sh --os android -arch x86 will fail earlier, during the mono build, unless you include #89027

but after that it's an eng/native/tryrun.cmake problem

@lambdageek
Copy link
Member Author

cc @directhex

@lambdageek lambdageek added area-Build-mono and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jul 17, 2023
@lambdageek lambdageek added this to the 8.0.0 milestone Jul 17, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jul 17, 2023
lambdageek added a commit that referenced this issue Jul 18, 2023
This PR allows an `osx-arm64` or `osx-x64` machine to produce a `mono-aot-cross` compiler that will run on the following host and create AOT images for the following targets:

| Host | Target | Test App runs |
|--------|--------|--------|
| osx-arm64 | iossimulator-x64 | ✅  |
| osx-arm64 | android-x64 | ✅   |
| osx-arm64 | android-x86 | ✅  - depends on a hack for #89039 | 

Additionally a `linux-x64` or `linux-arm64` machine can build a `mono-aot-cross` compiler for these host/target pairs:

| Host | Target | Test App runs |
|--------|--------|--------|
| linux-arm64 | android-x64 | ❓ |
| linux-arm64 | linux_musl-x64 | ❓ |
| linux-arm64 | android-x86 | ❓ |

Related to #82495

* [aot][ios] Build cross-compilers targeting x64 hosted on arm64

* Use MONO_CROSS_COMPILE instead of host checks

* [android][x86] Build mono-aot-cross hosted on osx-arm64 targeting android-x86

* fix build of mono-aot-cross hosted on linux-arm64 targeting android-x64

* runtime pipeline changes to build arm64 artifacts on x64 hardware

* Fix linux_musl-arm64 builds

---------

Co-authored-by: Jo Shields <directhex@apebox.org>
@steveisok steveisok modified the milestones: 8.0.0, 9.0.0 Aug 9, 2023
@lewing lewing assigned vitek-karas and unassigned directhex Feb 21, 2024
@vitek-karas vitek-karas removed their assignment Feb 27, 2024
@lewing
Copy link
Member

lewing commented Jul 30, 2024

@akoeplinger what work is left here?

@lewing lewing modified the milestones: 9.0.0, 10.0.0 Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants