mirror of
https://github.com/bkaradzic/bimg.git
synced 2026-06-08 10:53:46 +00:00
emsdk >= 5.0 no longer predefines the legacy `EMSCRIPTEN` macro, only `__EMSCRIPTEN__` (see emscripten-core/emscripten#21899). Switch posh's OS+CPU detection to the modern spelling so vendored nvtt builds under current emsdk. Without this, posh falls through to "unknown OS", defsgnuclinux.h is never included, `#define restrict __restrict__` never runs, and nvcore/utils.h ships bare `restrict` into clang which rejects it ("expected ')'"). POSH_CPU detection then also fails with "POSH cannot determine target CPU". Suggested by @bkaradzic — drop the legacy spelling rather than add `__EMSCRIPTEN__` alongside it.