[PATCH] D63688: [Support] Fix build under Emscripten

Keno Fischer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 22 16:49:06 PDT 2019


loladiro created this revision.
loladiro added a reviewer: kripken.
Herald added subscribers: llvm-commits, kristina.
Herald added a project: LLVM.

Emscripten's libc doesn't define MNT_LOCAL, thus causing a build
failure in the fallback path. However, to the best of my knowledge,
it also doesn't support remote file system mounts, so we may simply
return `true` here (as we do for e.g. Fuchsia). With this fix, the
core LLVM libraries build correctly under emscripten (though some
of the tools and utils do not).


Repository:
  rL LLVM

https://reviews.llvm.org/D63688

Files:
  lib/Support/Unix/Path.inc


Index: lib/Support/Unix/Path.inc
===================================================================
--- lib/Support/Unix/Path.inc
+++ lib/Support/Unix/Path.inc
@@ -424,6 +424,9 @@
 #elif defined(__Fuchsia__)
   // Fuchsia doesn't yet support remote filesystem mounts.
   return true;
+#elif defined(__EMSCRIPTEN__)
+  // Emscripten doesn't currently support remote filesystem mounts.
+  return true;
 #elif defined(__HAIKU__)
   // Haiku doesn't expose this information.
   return false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63688.206126.patch
Type: text/x-patch
Size: 489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190622/9dfa7ffc/attachment.bin>


More information about the llvm-commits mailing list