mirror of
https://github.com/neovim/neovim.git
synced 2026-02-11 22:38:48 +00:00
Problem: When building Neovim with Emscripten for WebAssembly, the `CMAKE_TOOLCHAIN_FILE` is not propagated to dependency builds. So libuv attempts to include Linux-specific headers like `sys/epoll.h` which don't exist in the WebAssembly environment. From #37572: …/NeovimWeb/external/neovim/.deps/build/src/libuv/src/unix/linux.c:44:10: fatal error: 'sys/epoll.h' file not found 44 | #include <sys/epoll.h> | ^~~~~~~~~~~~~ Solution: 1. Add initialization for DEPS_CMAKE_ARGS to prevent CMake errors. 2. Implement conditional logic to always pass CMAKE_TOOLCHAIN_FILE to dependencies. This allows dependencies like libuv to detect they're building for WebAssembly and disable incompatible Linux specific features such as epoll which resolves the sys/epoll.h error.