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

Dan Gohman via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 8 16:59:23 PST 2016


sunfish added a comment.

The other main way we could provide __unix et al would be to add them to tools/shared.py in Emscripten (see the comment "wasm target does not automatically define emscripten stuff"). It's not clear to me whether that's better than adding the macros to clang itself or not.

Currently Unixy-like functionality is provided by Emscripten facilities, and one could think of (hypothetical future) non-Emscripten clang as targeting more of the bare metal of WebAssembly which isn't inherently Unixy. Thoughts?

However, I'm also open to just adding it to clang for now and re-evaluating later, which we can do since we don't yet have a stable ABI.


https://reviews.llvm.org/D26431





More information about the cfe-commits mailing list