summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorKeno Fischer <keno@alumni.harvard.edu>2019-06-23 00:29:59 +0000
committerKeno Fischer <keno@alumni.harvard.edu>2019-06-23 00:29:59 +0000
commit5f4ae7c45718618c4c571495e7d910d5722f70ad (patch)
treefc30ac8c8c739c32a6710c4b40f6f0cf0e766b5b /llvm/lib/Support
parentbc85dbe2ba7af6cd0664729e4f1f42f9c1bd5209 (diff)
downloadbcm5719-llvm-5f4ae7c45718618c4c571495e7d910d5722f70ad.tar.gz
bcm5719-llvm-5f4ae7c45718618c4c571495e7d910d5722f70ad.zip
[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 llvm-svn: 364143
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Unix/Path.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
index 359202fc316..280624e9e51 100644
--- a/llvm/lib/Support/Unix/Path.inc
+++ b/llvm/lib/Support/Unix/Path.inc
@@ -424,6 +424,9 @@ static bool is_local_impl(struct STATVFS &Vfs) {
#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;
OpenPOWER on IntegriCloud