gn with MinGW on WindowsAt the time of writing: 2024-04-13 Test environment: Windows 11, intel x86_64 CPU
clang32.exe, clang64.exe, clangarm64.exe,mingw32.exe, mingw64.exe, ucrt64.exe.pacman -S mingw-w64-clang-x86_64-toolchain mingw-w64-clang-x86_64-ninja gitgngn source code, run command: git clone https://gn.googlesource.com/gncd gnbuild/gen.py --platform mingw--help flag to check more configuration options.--allow-warning flag to build with warnings.ninja -C outout/gn --versionout/gn_unittestsNotes:
For “mingw-w64-clang-x86_64-toolchain” in the clang64 environment, g++ is a copy of clang++.
The toolchain that builds
gndoes not use vendor lock-in compiler command flags, sogncan be built with these clang++, g++.However the build rules in examples/simple_build require GCC-specific compiler macros, and thus only work in the
ucrt64MSYS2 development environment.