[WIP]
In Windows we build using the toolchain provided by MSYS2 - the resulting binaries DO NOT link against the MSYS2 runtime.
Start by installing the necessary dependencies
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-libtool mingw-w64-x86_64-cmake \
mingw-w64-x86_64-make mingw-w64-x86_64-perl mingw-w64-x86_64-python2 \
mingw-w64-x86_64-pkg-config mingw-w64-x86_64-unibilium gperf
Set your PATH to include the mingw64 tools
set PATH=c:\msys64\mingw64\bin;%PATH%
The following is not always required, but sometimes mingw32-make fails to invoke the correct compiler
set CC=gcc
Build using the MinGW Makefiles
generator
mkdir .deps
cd .deps
cmake -G "MinGW Makefiles" ..\third-party\
mingw32-make
cd ..
mkdir build
cd build
cmake -G "MinGW Makefiles" -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" ..
mingw32-make
To build from inside the MinGW64 shell install mingw64-x86_64-lua51-mpack
and use the MSYS Makefiles
generator.
mkdir .deps
cd .deps
cmake -G "MSYS Makefiles" -DUSE_BUNDLED_LUAROCKS=NO ../third-party
make
cd ..
mkdir build
cd build
cmake -G "MSYS Makefiles" ..
make
Currently there is no way to run tests and some development tasks inside the MSYS2 shell, because .bat files cannot be executed there, and path conversions do not work well with some of the lua tools.
I've tried to build neovim for msys2 with the exact commands but I got this: