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

CMakeLists: Enable asyncify when targeting WASM #12921

Merged
merged 2 commits into from Mar 5, 2024

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Mar 5, 2024

This fixes calls that yield to the event loop when targeting WebAssembly (e.g. QDialog::exec would previously crash), as per https://doc.qt.io/qt-6/wasm.html#asyncify.

It does add some overhead unfortunately (the WASM binary went from 256M -> 304M and linking became considerably slower), even with the recommended optimizations (-Os), but better to have something that runs than crashes.

This fixes the QDialog::exec issue
Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

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

LGTM, thank you.

@daschuer daschuer merged commit a429977 into mixxxdj:main Mar 5, 2024
13 checks passed
@fwcd fwcd deleted the emscripten-asyncify branch March 5, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants