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

Allow building libmgba with threads disabled #2065

Closed
wants to merge 1 commit into from

Conversation

jprjr
Copy link

@jprjr jprjr commented Mar 16, 2021

Unsure if this should be the default for the LIBMGBA_ONLY option, so it still defaults to wanting threads.

Also allows building a shared library with the LIBMGBA_ONLY target, by only setting it if not already defined.

The use-case I have in mind for this - I'm working on a minigsf decoder that uses mgba, and just don't need threads.

Unsure if this should be the default for the LIBMGBA_ONLY option, so it still defaults to wanting threads.

Also allows building a shared library with the LIBMGBA_ONLY target, by only setting it if not already defined.
@endrift
Copy link
Member

endrift commented Mar 16, 2021

I don't know how I feel about this. Being able to build libmgba without threads sounds okay, but it would immediately break all frontends if you tried it, so having it be an "advanced" cache option makes me a bit itchy.

That said, you should check out @kode54's downstream since I think he already has something for that.

@kode54
Copy link
Contributor

kode54 commented Mar 16, 2021

Yeah, my downstream features a slight modification to include a minimal build level of 3, which completely disables all rendering features, since a GSF player doesn't need those. It still has the register interact portions of the PPU, but no rendering support.

@jprjr
Copy link
Author

jprjr commented Mar 16, 2021

Would you be open to a minimal "core" option, similar to what @kode54 has? Similar to a BUILD_LIBRETRO or BUILD_OPENEMU option? Something like BUILD_GSF or BUILD_MINIGSF? It could output a separate library file as well.

@endrift
Copy link
Member

endrift commented Mar 16, 2021

The reason I didn't want to add MINIMAL_CORE=3 is already detailed in #1288--basically, instead of saying "turn off a bunch of components" I want it to enumerate the specific components to turn off. That said, installing a core that has no threads and no video isn't exactly appropriate for something packaged so a one-off core for e.g. BUILD_GSF may be a better solution.

@jprjr
Copy link
Author

jprjr commented Mar 16, 2021

Oh, I didn't see #1288 - I'll take a look through that and see if I can come up with something, thank you!

@jprjr jprjr closed this Mar 17, 2021
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.

3 participants