[llvm] r364143 - [Support] Fix build under Emscripten

Keno Fischer via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 22 17:29:59 PDT 2019


Author: kfischer
Date: Sat Jun 22 17:29:59 2019
New Revision: 364143

URL: http://llvm.org/viewvc/llvm-project?rev=364143&view=rev
Log:
[Support] Fix build under Emscripten

Summary:
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).

Reviewers: kripken
Differential Revision: https://reviews.llvm.org/D63688

Modified:
    llvm/trunk/lib/Support/Unix/Path.inc

Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=364143&r1=364142&r2=364143&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Sat Jun 22 17:29:59 2019
@@ -424,6 +424,9 @@ static bool is_local_impl(struct STATVFS
 #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;




More information about the llvm-commits mailing list