Set appropriate host defines for building under emscripten

Emscripten has emulations for several headers found on Linux,
including spwan.h and endian.h

Differential Revision: https://reviews.llvm.org/D82121
This commit is contained in:
Derek Schuff 2020-06-18 13:06:51 -07:00
parent 92f22259e0
commit c1709e5d90
3 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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>