diff --git a/src/runtime/gc.h b/src/runtime/gc.h index c3a7678a2..88e180dfa 100644 --- a/src/runtime/gc.h +++ b/src/runtime/gc.h @@ -321,12 +321,7 @@ struct alignas(PadObject) GCObject : public B { template GCObject(ARGS &&...args) : B(std::forward(args)...) { static_assert(sizeof(MovedObject) <= sizeof(T), "HeapObject is too small"); -// TODO: on wasm pointer types are 4 bytes while doubles are 8 and that is -// causing this assert to fail. Doubles won't be properly aligned in wasm -// which may prove troublesome. -#ifndef __EMSCRIPTEN__ static_assert(sizeof(PadObject) == alignof(T), "HeapObject alignment wrong"); -#endif } T *self() { return static_cast(this); } diff --git a/src/runtime/status.cpp b/src/runtime/status.cpp index 35522e710..8d7c5fca1 100644 --- a/src/runtime/status.cpp +++ b/src/runtime/status.cpp @@ -21,8 +21,6 @@ #include "status.h" -#ifndef __EMSCRIPTEN__ - #include #include #include @@ -568,42 +566,3 @@ void status_finish() { setitimer(ITIMER_REAL, &timer, 0); } } - -#else -#include - -StatusState status_state; - -void status_init() {} - -// TODO: I need to make a stream buf specifically for emscripten -void status_write(const char *name, const char *data, int len) { - // clang-format off - EM_ASM_INT({ - console.log('[' + UTF8ToString($0) + '] ' + UTF8ToString($1)); - return 0; - }, name, data); - // clang-format on -} - -void status_refresh(bool idle) {} -void status_finish() {} - -void status_set_colour(const char *name, int colour) {} -void status_set_fd(const char *name, int fd) {} -void status_set_bulk_fd(int fd, const char *streams) {} - -int status_get_colour(const char *name) { return 0; } - -int status_get_fd(const char *name) { return -1; } - -std::ostream &status_get_generic_stream(const char *name) { return std::cout; } - -void StatusBuf::emit_header() {} -int StatusBuf::overflow(int c) { return 0; } -StatusBuf::StatusBuf(std::string name, wcl::optional extra, int color, - TermInfoBuf &buf) - : buf(buf) {} -StatusBuf::~StatusBuf() {} - -#endif diff --git a/src/util/poll.cpp b/src/util/poll.cpp index b764a63f0..78ee8e8c0 100644 --- a/src/util/poll.cpp +++ b/src/util/poll.cpp @@ -31,8 +31,6 @@ #define USE_EPOLL 1 #elif defined(__APPLE__) #define USE_PSELECT 1 -#elif defined(__EMSCRIPTEN__) -#define USE_PSELECT #else #define USE_PPOLL 1 #endif diff --git a/tools/fuse-waked/fuse-waked.wake b/tools/fuse-waked/fuse-waked.wake index 2a185944d..21737229e 100644 --- a/tools/fuse-waked/fuse-waked.wake +++ b/tools/fuse-waked/fuse-waked.wake @@ -19,6 +19,4 @@ from wake import _ from gcc_wake import _ target buildFuseDaemon variant: Result (List Path) Error = match variant - # Fuse doesn't, and likely won't ever, support building for wasm - Pair "wasm-cpp14-release" _ = Pass Nil _ = tool @here Nil variant "lib/wake/fuse-waked" (json, fuse, util, Nil) Nil Nil diff --git a/vendor/gmp.wake b/vendor/gmp.wake index 5cd1b4cd7..5e124fef4 100644 --- a/vendor/gmp.wake +++ b/vendor/gmp.wake @@ -16,41 +16,6 @@ package build_wake from wake import _ -from gcc_wake import _ -def gmp = match _ - Pair "wasm-cpp14-release" _ = buildGmpWASM Unit - _ = Pass (pkg "gmp") - -def buildGmpWASM _ = - require Some emmake = emmake - else failWithError "emmake is not available" - - def emsdk = replace `/[^/]*$` "" emmake - def version = "6.2.1" - - require Pass buildDir = vendorBuildDir Unit - - def job = - """ - cd .build - wget https://ftp.gnu.org/gnu/gmp/gmp-%{version}.tar.xz - tar xmf gmp-%{version}.tar.xz - cd gmp-%{version} - emconfigure ./configure --disable-assembly --host none --enable-cxx - emmake make -j4 MAKEINFO=true - """ - | makePlan "compiling gmp" (buildDir, Nil) - | editPlanEnvironment (addEnvironmentPath emsdk) - | setPlanDirectory @here - | setPlanShare False - | runJobWith defaultRunner - - require Pass outputs = job.getJobOutputs - - def headers = filter (matches `.*\.h` _.getPathName) outputs - def objects = filter (matches `.*\.a` _.getPathName) outputs - def cflags = "-I{@here}/.build/gmp-{version}", Nil - def lflags = Nil - - Pass (SysLib version headers objects cflags lflags) +def gmp _ = + Pass (pkg "gmp") diff --git a/vendor/sqlite3.wake b/vendor/sqlite3.wake index 9fdabf196..35686255f 100644 --- a/vendor/sqlite3.wake +++ b/vendor/sqlite3.wake @@ -16,40 +16,6 @@ package build_wake from wake import _ -from gcc_wake import _ -def sqlite3 = match _ - Pair "wasm-cpp14-release" _ = buildSqlite3WASM Unit - _ = Pass (pkg "sqlite3") - -def buildSqlite3WASM _ = - require Some emmake = emmake - else failWithError "emmake is not available" - - def emsdk = replace `/[^/]*$` "" emmake - def version = "0.0.0" - - require Pass buildDir = vendorBuildDir Unit - - def job = - """ - cd .build - wget https://sqlite.org/2022/sqlite-amalgamation-3390200.zip - unzip sqlite-amalgamation-3390200 - cd sqlite-amalgamation-3390200 - emcc -c sqlite3.c - """ - | makePlan "compiling sqlite3" (buildDir, Nil) - | editPlanEnvironment (addEnvironmentPath emsdk) - | setPlanDirectory @here - | setPlanShare False - | runJobWith defaultRunner - - require Pass outputs = job.getJobOutputs - - def headers = filter (matches `.*\.h` _.getPathName) outputs - def objects = filter (matches `.*\.o` _.getPathName) outputs - def cflags = "-I{@here}/.build/sqlite-amalgamation-3390200", Nil - def lflags = Nil - - Pass (SysLib version headers objects cflags lflags) +def sqlite3 _ = + Pass (pkg "sqlite3")