llvm-project
f7b2c2e4 - [openmp][WebAssembly] Allow openmp to compile and run under emscripten toolchain (#95169)

Commit
1 year ago
[openmp][WebAssembly] Allow openmp to compile and run under emscripten toolchain (#95169) * Separate wasi and emscripten as they have different constraints and abilities * Emscripten mimics Linux/POSIX by statically linking the musl runtime. This allow nearly all KMP_OS_LINUX code paths to work correctly. There are only a few places that need to be adjusted related to dynamic linking (dl_open) * Internally link openmp globals * With CommonLinkage it is needed to emit them in an assembly file, now they are defined and used within each compilation unit * With ExternalLinkage they suffer from duplicate symbols during linking for unnamed globals like reduction/critical * Interestingly this aligns with the TODO comment above this code
Author
Parents
Loading