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 jthread implementation for Clang #19

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NeRdTheNed
Copy link
Contributor

@NeRdTheNed NeRdTheNed commented Mar 8, 2023

Clang does not yet implement jthread, causing builds with Clang to fail. This PR adds an implementation of jthread from https://github.com/StirlingLabs/jthread, which acts as a polyfill when building with a version of Clang which does not support jthread (currently all versions of Clang). This will allow future versions of Clang to build AmalgamEngine.

It's noted in Clang 16's future release notes that it will support parenthesised aggregate initialisation, the only other missing feature in Clang 15 required to build AmalgamEngine. After manually replacing all uses of parenthesised aggregate initialisation, AmalgamEngine is able to build with Clang 15, but the changes are somewhat intrusive and brittle, so it might just be best to wait for Clang 16 to release. Clang 16 seems to be at the release candidate stage, so it's likely to get a full release soon.

@Net5F
Copy link
Owner

Net5F commented Mar 9, 2023

Thanks for looking into this, I agree with waiting for Clang 16. If the gcc build doesn't need jthread, I think we should leave this PR for now and merge it as we make the switch. Sound good?

@NeRdTheNed
Copy link
Contributor Author

I agree, I'll leave this open as-is for now.

@NeRdTheNed NeRdTheNed force-pushed the jthread-clang-polyfill branch from 2295f5d to 3607e6b Compare March 10, 2023 22:46
@NeRdTheNed NeRdTheNed marked this pull request as draft March 19, 2023 01:37
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.

2 participants