Skip to content

Commit 5a9cce1

Browse files
vchuravyKeno
authored andcommitted
backport wasm islocal patch (#34012)
1 parent 4800158 commit 5a9cce1

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

deps/llvm.mk

+4-3
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,9 @@ $(eval $(call LLVM_PATCH,llvm-D51842-win64-byval-cc))
421421
$(eval $(call LLVM_PATCH,llvm-D57118-powerpc))
422422
$(eval $(call LLVM_PATCH,llvm-r355582-avxminmax)) # remove for 8.0
423423
$(eval $(call LLVM_PATCH,llvm-rL349068-llvm-config)) # remove for 8.0
424-
$(eval $(call LLVM_PATCH,llvm-6.0-D63688-wasm-isLocal))
425-
$(eval $(call LLVM_PATCH,llvm-6.0-D64032-cmake-cross))
426-
$(eval $(call LLVM_PATCH,llvm-6.0-D64225-cmake-cross2))
424+
$(eval $(call LLVM_PATCH,llvm-6.0-D63688-wasm-isLocal)) # remove for 9.0
425+
$(eval $(call LLVM_PATCH,llvm-6.0-D64032-cmake-cross)) # remove for 9.0
426+
$(eval $(call LLVM_PATCH,llvm-6.0-D64225-cmake-cross2)) # remove for 9.0
427427
$(eval $(call LLVM_PATCH,llvm6-WASM-addrspaces)) # WebAssembly
428428
endif # LLVM_VER 6.0
429429

@@ -459,6 +459,7 @@ $(eval $(call LLVM_PATCH,llvm-exegesis-mingw)) # mingw build
459459
$(eval $(call LLVM_PATCH,llvm-test-plugin-mingw)) # mingw build
460460
$(eval $(call LLVM_PATCH,llvm-8.0-D66401-mingw-reloc)) # remove for 9.0
461461
$(eval $(call LLVM_PATCH,llvm7-revert-D44485))
462+
$(eval $(call LLVM_PATCH,llvm-8.0-D63688-wasm-isLocal)) # remove for 9.0
462463
endif # LLVM_VER 8.0
463464

464465
ifeq ($(LLVM_VER_SHORT),9.0)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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

Comments
 (0)