[Openmp-commits] [llvm] [openmp] [openmp][WebAssembly] Allow openmp to compile and run under emscripten toolchain (PR #95169)
Jaap Aarts via Openmp-commits
openmp-commits at lists.llvm.org
Tue Dec 16 08:53:06 PST 2025
JAicewizard wrote:
Yes `KMP_ARCH_WASM` is indeed defined (to 1). However the resulting archive does not contain the symbol. Does something else need to be linked?
This is how I compile:
```
emcmake cmake .-G Ninja -DOPENMP_STANDALONE_BUILD=ON \
-DOPENMP_ENABLE_LIBOMPTARGET=OFF -DLIBOMP_HAVE_OMPT_SUPPORT=OFF \
-DLIBOMP_OMPT_SUPPORT=OFF -DLIBOMP_OMPD_SUPPORT=OFF \
-DLIBOMP_USE_DEBUGGER=OFF -DLIBOMP_FORTRAN_MODULES=OFF \
-DLIBOMP_ENABLE_SHARED=OFF -DLIBOMP_ARCH=wasm32 \
-DOPENMP_ENABLE_LIBOMPTARGET_PROFILING=OFF -DCMAKE_INSTALL_PREFIX=/
```
And the symbol is missing:
```
$ /usr/bin/llvm-nm runtime/src/libomp.a | grep __kmp_unnamed_critical_addr
runtime/src/libomp.a:kmp_itt.cpp.o: no symbols
U __kmp_unnamed_critical_addr
runtime/src/libomp.a:z_Linux_asm.S.o: no symbols
```
Is something missing in the compilation step? Or is this symbol unneeded? If the latter is the case I will find out how to ignore this error.
https://github.com/llvm/llvm-project/pull/95169
More information about the Openmp-commits
mailing list