Files
liblogging/subprojects/packagefiles/quill/add_wasm_rdtsc_fallback_support.patch
Emily Boudreaux 888d44cec1 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
2025-12-03 10:46:29 -05:00

21 lines
808 B
Diff

--- quill/include/quill/core/Rdtsc.h.orig 2025-12-03 09:43:26.530875697 -0500
+++ quill/include/quill/core/Rdtsc.h 2025-12-03 09:42:49.852913743 -0500
@@ -16,7 +16,7 @@
#elif defined(__ARM_ARCH)
#include <chrono>
#include <cstdint>
-#elif (defined(_M_ARM) || defined(_M_ARM64))
+#elif (defined(_M_ARM) || defined(_M_ARM64) || defined(__wasm__))
#include <chrono>
#include <cstdint>
#elif (defined(__PPC64__))
@@ -72,7 +72,7 @@
// soft failover
return static_cast<uint64_t>(std::chrono::system_clock::now().time_since_epoch().count());
}
-#elif (defined(_M_ARM) || defined(_M_ARM64) || defined(__PPC64__))
+#elif (defined(_M_ARM) || defined(_M_ARM64) || defined(__PPC64__) || defined(__wasm__))
QUILL_NODISCARD QUILL_ATTRIBUTE_HOT inline uint64_t rdtsc() noexcept
{
// soft failover