|
| 1 | +From 83d5085a7fcbb4596d964dbe037c5ebf4de02b69 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Keno Fischer < [email protected]> |
| 3 | +Date: Sun, 23 Jun 2019 00:29:59 +0000 |
| 4 | +Subject: [PATCH] [Support] Fix build under Emscripten |
| 5 | + |
| 6 | +Summary: |
| 7 | +Emscripten's libc doesn't define MNT_LOCAL, thus causing a build |
| 8 | +failure in the fallback path. However, to the best of my knowledge, |
| 9 | +it also doesn't support remote file system mounts, so we may simply |
| 10 | +return `true` here (as we do for e.g. Fuchsia). With this fix, the |
| 11 | +core LLVM libraries build correctly under emscripten (though some |
| 12 | +of the tools and utils do not). |
| 13 | + |
| 14 | +Reviewers: kripken |
| 15 | +Differential Revision: https://reviews.llvm.org/D63688 |
| 16 | + |
| 17 | +llvm-svn: 364143 |
| 18 | +(cherry picked from commit 5f4ae7c45718618c4c571495e7d910d5722f70ad) |
| 19 | +--- |
| 20 | + llvm/lib/Support/Unix/Path.inc | 3 +++ |
| 21 | + 1 file changed, 3 insertions(+) |
| 22 | + |
| 23 | +diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc |
| 24 | +index d7cc0d627d0..eb38a71fffb 100644 |
| 25 | +--- a/lib/Support/Unix/Path.inc |
| 26 | ++++ b/lib/Support/Unix/Path.inc |
| 27 | +@@ -398,6 +398,9 @@ static bool is_local_impl(struct STATVFS &Vfs) { |
| 28 | + #elif defined(__Fuchsia__) |
| 29 | + // Fuchsia doesn't yet support remote filesystem mounts. |
| 30 | + return true; |
| 31 | ++#elif defined(__EMSCRIPTEN__) |
| 32 | ++ // Emscripten doesn't currently support remote filesystem mounts. |
| 33 | ++ return true; |
| 34 | + #elif defined(__HAIKU__) |
| 35 | + // Haiku doesn't expose this information. |
| 36 | + return false; |
| 37 | +-- |
| 38 | +2.24.0 |
| 39 | + |
0 commit comments