-
Notifications
You must be signed in to change notification settings - Fork 518
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
Arm64 bindings #1825
Arm64 bindings #1825
Conversation
Sorry, meant to open as draft. I made a pretty silly mistake in the MacOS headers that I'll have to correct tomorrow. Would love some eyes on the linux side in the meantime tho. |
Took a crack at resolving the errors this morning to no avail. Updated the headers package with a clean version. Might help to have someone more familiar with the project take a swing at resolving the segfaults on ARM64 Mac. |
This looks pretty close, think you might need to update here aswell: https://github.com/mono/CppSharp/blob/main/src/CppParser/Bindings/CSharp/CppSharp.Parser.CSharp.csproj#L9 |
So the state of play:
Failure logs:
|
Do you mean on CI? From what I am seeing on the logs, both Mac and Linux seem to be compiling and linking fine. They only fail during runtime when trying to generate the test bindings. So I would think both the LLVM builds and CppSharp builds are using ARM64 hosts on CI. |
That's interesting, because attempting to use the generated
Archive files are a little harder to inspect than shared libs, but I'm used to seeing this error when the generated archive contains the wrong architecture. EDIT: Indeed, it's hard to tell from the LLVM CI build logs, but here's the relevant line where it indicates it's building on x64 for x64: https://github.com/mono/CppSharp/actions/runs/7760243198/job/21166046377#step:5:221 I assume this means we have to update |
Yeah, you are right, missed that. So, for macOS, looks like Github added new runners, for M1, just a few days ago: https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/ For Linux, looks like they are also working on adding them: https://github.blog/changelog/2023-10-30-accelerate-your-ci-cd-with-arm-based-hosted-runners-in-github-actions/ But I am not sure they are available outside private beta yet. |
Gotcha. Let me cook up some cmake toolchain files to do the LLVM cross compile anyway. That’d save me a ton of time. I’ll make that in a different branch to expedite review and we can kick off a new LLVM job. |
c6c9380
to
3bda5b6
Compare
Actually, while I have you: what's the correct way to determine host architecture in premake? I can't seem to find a way to test to see if we're executing on an x64 host for an arm64 target. |
For host I think you can use And for target architecture: Line 92 in 1d1b21f
|
Oh, yes, I did find
Not quite enough to do the dirty work I'm afraid. I guess I can use |
OK, state of play:
|
Which libraries is it failing to find? |
Sorry, I'm not able to continue working on this due to some major life stuff. I'll close it for now. If anyone else wants to pick up the effort just ping me and I'll try to help as able. |
Depends on #1824. Expands bindings to include ARM64 for Linux and Mac, and updates Mac headers to 12.3 to allow for ARM64 usage.
Uses the following updated header package: headers.zip