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

Add libs for linux-arm64 and linux-arm #55

Closed
wants to merge 172 commits into from
Closed

Add libs for linux-arm64 and linux-arm #55

wants to merge 172 commits into from

Conversation

kvnp
Copy link
Contributor

@kvnp kvnp commented May 15, 2024

This PR adds the linux-arm64 and linux-arm libraries as part of ppy/osu-deploy#170.

smoogipoo and others added 30 commits April 4, 2024 03:12
The bindings don't yet compile. There are errors in SDL_pixels.g.cs, SDL_stdinc.g.cs and SDL_thread.g.cs,
a bunch of warnings about "Function like macro definition records are not supported",
and a few "Info: Potential missing remapping".

Built on SDL commit:
libsdl-org/SDL@6ad390f
Probably needs similar undefines on Linux and macOS.

Notice that the signatures of `SDL_CreateThread` and `SDL_CreateThreadWithStackSize`
have changed.
There are warnings for platform-specific functions.
Doesn't compile because of duplicate `_XEvent` definitions.
Linux fails crossgen on Windows due to missing `endian.h`
The win32 types are kinda cursed, but it makes it easy to copy&paste and check.
These map to 16-bit `ushort` on windows, but are 32-bit on Unix.
This matches .NET's UTF-8 `ReadOnlySpan<byte>` (see `SDL_hints.g.cs`).
Produces a lot of noise about unused remappings (as we're processing a header at a time).
All remappings (except `SDL_JoystickGUID`) have been added.

`SDL_JoystickGUID` is a remapping of a struct, so it's harded to do programatically.
This doesn't compile as ClangSharp fails to emit `unchecked`
in `SDL_pen.g.cs` and `SDL_touch.g.cs`.
And `(SDL_bool)` casts in `SDL_rect.g.cs`.
This doesn't compile because of duplicate `SDL_Keycode` definition
All of these get "Function like macro definition records are not supported: [...] Generated bindings may be incomplete."
warnings when running ClangSharp.
Useful as any pointer type can implicitly covert to void *.
Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

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

Thanks for this, just a few nits.

native/linux-arm/libSDL3.so Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to separate this into a new workflow rather than bundling into build.yml? Means we have to manually run two workflows for every update.

The ideal solution would be to have a sh script that runs the build commands that can be shared between the docker/non-docker variants, but I think I'd be fine to just bundle it into build.yml as is for now if that's too complicated for whatever reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to avoid having to tinker with the already working build.yml, but having them together is the cleaner solution. The build script is now in build.sh.

@kvnp kvnp force-pushed the master branch 2 times, most recently from 87b6676 to ce228d6 Compare May 15, 2024 12:09
@kvnp kvnp force-pushed the master branch 5 times, most recently from ac95bf5 to d692bb5 Compare May 15, 2024 14:57
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.

5 participants