When I downloaded WebAssembly/wabt from GitHub, it built right away using CMake, CMake-GUI, GCC8, and GNU Make, it built right away even in parallel build. There were only a few warnings, mostly related to a missing assert.h file. When I later tried running the 190 unit tests for WABT, they all ran successfully.
Since there is no WASM backend for GCC, I tried repeating the above steps using LLVM-12, LLVM-12libs, Clang-12 and Ninja. I specified clang and clang++ in CMake-GUI as the tools to build WABT but what were warnings about assert.h are outright errors on Clang++.
As a fallback plan I am looking into cross compiling from Clang++ under Linux. Now I only need the headers from Haiku to generate the WASM file.