If that is the ground reality for the platform, perhaps defined(__wasm__) might work better.
- to avoid cost of CMake compile-time tests
- make the platform requirement clear.
HAVE_XXX is sometimes used for “we provide a similar API in a different name”
Is it cleaner to define LLVM_ON_UNIX for __wasm__ or not?