build(wasm): liblogging now builds for wasm
Further, due to limitations of file system access on wasm, liblogging now outputs all logs to the console syncronously
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
--- quill/inlcude/quill/backend/BackendUtilities.h.orig 2025-12-03 10:02:26.861779737 -0500
|
||||
+++ quill/include/quill/backend/BackendUtilities.h 2025-12-03 10:09:04.509482559 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
#elif defined(__CYGWIN__)
|
||||
#include <sched.h>
|
||||
#include <unistd.h>
|
||||
-#elif defined(__linux__)
|
||||
+#elif (defined(__linux__) || defined(__EMSCRIPTEN__))
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#include <unistd.h>
|
||||
@@ -84,6 +84,8 @@
|
||||
thread_port_t mach_thread = pthread_mach_thread_np(pthread_self());
|
||||
|
||||
thread_policy_set(mach_thread, THREAD_AFFINITY_POLICY, (thread_policy_t)&policy, 1);
|
||||
+#elif defined(__EMSCRIPTEN__)
|
||||
+ (void)cpu_id;
|
||||
#else
|
||||
cpu_set_t cpuset;
|
||||
CPU_ZERO(&cpuset);
|
||||
@@ -102,7 +104,7 @@
|
||||
/***/
|
||||
QUILL_ATTRIBUTE_COLD inline void set_thread_name(char const* name)
|
||||
{
|
||||
-#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(QUILL_NO_THREAD_NAME_SUPPORT)
|
||||
+#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(QUILL_NO_THREAD_NAME_SUPPORT) || defined(__EMSCRIPTEN__)
|
||||
// Disabled on MINGW / Cygwin.
|
||||
(void)name;
|
||||
#elif defined(_WIN32)
|
||||
@@ -154,4 +156,4 @@
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
-QUILL_END_NAMESPACE
|
||||
\ No newline at end of file
|
||||
+QUILL_END_NAMESPACE
|
||||
Reference in New Issue
Block a user