Files
neovim/src
Rawan Khalid 8aacce90b4 fix(cmake): linker flags, doc generation for cross-compilation #38215
Problem:
Cross-compilation issues encountered when building Neovim for WASM.
When cross-compiling, three issues occur:
1. `-Wl,--no-undefined` — not supported by `wasm-ld` 
2. `-lutil` — not available in the Emscripten sysroot
3. Doc generation fails because CMake tries to execute `$<TARGET_FILE:nvim_bin>` on the host machine, which fails because the binary is not native to the host. It fails with `/bin/sh: nvim.js: Permission denied`

Solution:
The fix includes skipping `-Wl,--no-undefined` and `-lutil` with `NOT CMAKE_CROSSCOMPILING` and adding `NVIM_HOST_PRG` variable to `runtime/CMakeLists.txt` so when cross-compiling, it uses a host native nvim binary for doc generation instead of using the cross-compiled target.
2026-03-11 19:05:46 +00:00
..
2026-03-11 18:00:18 +01:00
2023-11-05 20:19:06 +01:00
2025-11-29 23:15:47 -05:00
2025-08-02 15:58:11 -07:00
2025-12-08 01:43:02 -05:00