Skip to content

Commit 6dc3994

Browse files
committed
docs: describe MinGW Windows cross-compilation
Document the Linux-hosted MinGW-w64 UCRT64 cross-compilation option in the Windows section of the developer guide, pointing at the pr-compile-mingw-cross workflow job as the reference recipe. Signed-off-by: Jiawei Huang <jiawei@tigera.io>
1 parent ef74160 commit 6dc3994

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

DEVELOPER_GUIDE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,21 @@ At time of writing this workflow *does not run any of the Fluent Bit test suite*
676676
- so it only checks that the target branch can be compiled. To run tests, a local
677677
build will be required.
678678

679+
#### Cross-compiling from Linux with MinGW
680+
681+
Fluent Bit can also be cross-compiled for Windows from a Linux host using the
682+
MinGW-w64 UCRT64 toolchain, without a Windows machine or MSVC. The
683+
[`.github/workflows/pr-compile-check.yaml`](.github/workflows/pr-compile-check.yaml)
684+
`pr-compile-mingw-cross` job is the reference recipe: it runs in a Fedora
685+
container, installs the `ucrt64-gcc` cross toolchain, cross-builds a static
686+
libyaml, and then configures with
687+
`-DCMAKE_TOOLCHAIN_FILE=/usr/share/mingw/toolchain-ucrt64.cmake`.
688+
689+
Cross-builds produce `bin/fluent-bit.exe` but cannot run the test suites (the
690+
binaries are Windows executables). Note the toolchain must target UCRT
691+
(`x86_64-w64-mingw32ucrt`); the older MSVCRT-based MinGW toolchains are not
692+
supported.
693+
679694
#### Using Docker for Windows
680695

681696
For Windows users with Hyper-V capable machines the simplest way to build a

0 commit comments

Comments
 (0)