[PATCH] D26431: [WebAssembly] Define __unix__ as part of the wasm target

Jacob Gravelle via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 8 17:10:20 PST 2016


jgravelle-google added a comment.

I think you're right, it's the Emscripten embedding that's unixy, therefore Emscripten should be responsible for telling clang to be unixy.

To play devil's advocate, it might be advantageous for all compile-to-wasm code to assume a common environment, and unix is a reasonable thing to arbitrarily standardize on. But it's probably more advantageous to not decide that at this level.

Double-alternatively it might make sense to have a `wasm32-unknown-emscripten` triple, and let that determine whether we're unixy or not in clang.


https://reviews.llvm.org/D26431





More information about the cfe-commits mailing list