[clang] [lld] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

James Y Knight via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 14 18:02:43 PDT 2024


================
@@ -508,6 +512,9 @@ static bool is_local_impl(struct STATVFS &Vfs) {
 #elif defined(__EMSCRIPTEN__)
   // Emscripten doesn't currently support remote filesystem mounts.
   return true;
+#elif defined(__wasi__)
----------------
jyknight wrote:

It doesn't; C++ compilation only targets wasm.

The emscripten driver still supports generating javascript, but only via invoking the binaryen "wasm2js" tool post-link -- which translates the wasm binary into javascript.

https://github.com/llvm/llvm-project/pull/92677


More information about the cfe-commits mailing list