docs(windows): clarify why MSVC is the default toolchain

The previous framing leaned on "MSVC is what CI exercises" as the
reason MSVC is the default, which is circular — CI uses MSVC
because it's the default, not the other way around.

Restate the rationale as what it actually is: MSVC is Microsoft's
native Windows toolchain, ships with the Windows SDK, produces
binaries against the canonical Windows ABI, and is the toolchain
the broader Windows C++ ecosystem (debugger, profilers, libraries)
is built and tested against — so it gives the cleanest native
Windows experience. Demote the CI mention to a single sentence
noting that both MSVC and MinGW are exercised on every PR (so the
CI green covers the alternative too).
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
This commit is contained in:
Nuno Marques
2026-05-15 17:38:50 -07:00
parent b439dcebf6
commit c59c72893b
+5 -3
View File
@@ -34,10 +34,12 @@ Companion utilities (`px4-commander`, `px4-listener`, etc.) are produced as addi
Two compilers are supported:
- **MSVC** (Microsoft Visual C++, from Visual Studio 2022 or the Build Tools) — the default and the path exercised by the [`Windows SITL build` CI workflow](https://github.com/PX4/PX4-Autopilot/blob/main/.github/workflows/compile_windows.yml) on every PR.
Pick this if you have no preference: it is the toolchain we trust most on Windows and the one the rest of this guide defaults to.
- **MSVC** (Microsoft Visual C++, from Visual Studio 2022 or the Build Tools) — the default and the recommended choice on Windows.
MSVC is Microsoft's native Windows toolchain: it ships with the Windows SDK, produces binaries against the canonical Windows ABI, and is the toolchain the broader Windows C++ ecosystem (debugger, profilers, libraries) is built and tested against, so it gives the cleanest native Windows experience.
- **MinGW-w64** (the GCC port shipped with [MSYS2](https://www.msys2.org/)) — an alternative for users who prefer a GCC-style toolchain, want to reproduce a Linux MinGW cross-build, or want to keep the whole workflow inside plain _PowerShell_ (the MSVC path needs the _x64 Native Tools Command Prompt_).
Both are exercised by the [`Windows SITL build` CI workflow](https://github.com/PX4/PX4-Autopilot/blob/main/.github/workflows/compile_windows.yml) on every PR, so a successful CI green confirms both produce a working `px4.exe`.
The [setup script](#install-the-toolchain) installs MSVC by default; pass `-Toolchain MinGW` to install MinGW instead, or `-Toolchain Both` to install both.
::: info
@@ -184,7 +186,7 @@ If any of them prints _"is not recognized as the name of a cmdlet…"_, see [Com
## Build PX4 SITL
Pick the subsection that matches the toolchain you installed (see [Choosing the C++ Toolchain](#choosing-the-c-toolchain) above for the rationale): **MSVC** is the CI-exercised default; **MinGW-w64** is the alternative for GCC-based workflows.
Pick the subsection that matches the toolchain you installed (see [Choosing the C++ Toolchain](#choosing-the-c-toolchain) above for the rationale): **MSVC** is the recommended default on Windows; **MinGW-w64** is the alternative for GCC-based workflows.
### MSVC Build