[PATCH] D82121: Set appropriate host defines for building under emscripten

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 17:31:59 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc1709e5d90e6: Set appropriate host defines for building under emscripten (authored by dschuff).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82121/new/

https://reviews.llvm.org/D82121

Files:
  lldb/include/lldb/Host/HostInfo.h
  lldb/source/Host/common/Host.cpp
  llvm/include/llvm/Support/SwapByteOrder.h


Index: llvm/include/llvm/Support/SwapByteOrder.h
===================================================================
--- llvm/include/llvm/Support/SwapByteOrder.h
+++ llvm/include/llvm/Support/SwapByteOrder.h
@@ -21,7 +21,8 @@
 #include <stdlib.h>
 #endif
 
-#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__)
+#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__) ||            \
+    defined(__EMSCRIPTEN__)
 #include <endian.h>
 #elif defined(_AIX)
 #include <sys/machine.h>
Index: lldb/source/Host/common/Host.cpp
===================================================================
--- lldb/source/Host/common/Host.cpp
+++ lldb/source/Host/common/Host.cpp
@@ -28,7 +28,7 @@
 
 #if defined(__linux__) || defined(__FreeBSD__) ||                              \
     defined(__FreeBSD_kernel__) || defined(__APPLE__) ||                       \
-    defined(__NetBSD__) || defined(__OpenBSD__)
+    defined(__NetBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__)
 #if !defined(__ANDROID__)
 #include <spawn.h>
 #endif
Index: lldb/include/lldb/Host/HostInfo.h
===================================================================
--- lldb/include/lldb/Host/HostInfo.h
+++ lldb/include/lldb/Host/HostInfo.h
@@ -35,7 +35,7 @@
 #if defined(_WIN32)
 #include "lldb/Host/windows/HostInfoWindows.h"
 #define HOST_INFO_TYPE HostInfoWindows
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__EMSCRIPTEN__)
 #if defined(__ANDROID__)
 #include "lldb/Host/android/HostInfoAndroid.h"
 #define HOST_INFO_TYPE HostInfoAndroid


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82121.271888.patch
Type: text/x-patch
Size: 1554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200619/505fe883/attachment.bin>


More information about the llvm-commits mailing list