[Openmp-commits] [PATCH] D142593: [OpenMP] Support for wasm32 architecture
Petr Penzin via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jan 27 18:05:40 PST 2023
penzn added inline comments.
================
Comment at: openmp/runtime/src/kmp_os.h:1289-1290
+#elif KMP_ARCH_WASM
+#define KMP_DLSYM(name) nullptr
+#define KMP_DLSYM_NEXT(name) nullptr
#else
----------------
Emscripten has `dlopen` and `dlsym` emulation under a flag, though other ways to use Clang won't provide that.
================
Comment at: openmp/runtime/src/kmp_platform.h:42
#define KMP_OS_LINUX 1
-#elif (defined __linux__)
+#elif (defined __linux__) || defined(__EMSCRIPTEN__)
#undef KMP_OS_LINUX
----------------
Maybe it should be `__wasm32__` instead of `__EMSCRIPTEN__`, so that it is possible to build with non-Emscripten Clang (WASI-SDK, or even bare).
================
Comment at: openmp/runtime/src/z_Linux_util.cpp:2450
+
+typedef void (*microtask_t0)(int *, int *);
+typedef void (*microtask_t1)(int *, int *, void*);
----------------
Do you have to add those definitions because of how Wasm handles varargs?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142593/new/
https://reviews.llvm.org/D142593
More information about the Openmp-commits
mailing list