AmalgamEngine
AmalgamEngine copied to clipboard
Add jthread implementation for Clang
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.
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?
I agree, I'll leave this open as-is for now.