[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 21 04:46:38 PDT 2026


trcrsired wrote:

> > Let's do not make things worse by creating more fragmentations
> 
> But this PR does precisely that, by expecting a non-standard directory layout for `--sysroot`. By non-standard I mean modified from what the vendor provides. It might be a 'de-facto standard for UNIX' but it is _not_ the standard for Windows.
> 
> If the goal is to get `--sysroot` to expect `{arch}-pc-windows-msvc` then I believe the correct solution is to alias it to `-Xmicrosoft-windows-sys-root` when the argument value is `{arch}-pc-windows-msvc`, and ensure case-insensitivity is correctly handled in the driver. As it is, this PR is therefore incomplete.

POSIX is the OS standard for all OSes (including linux, windows, mac, bsd, whatever you call it) not just "for UNIX". Linux is not even UNIX. It is a common misunderstanding. Windows existence does not justifiy POSIX not being the standard for OS. Even ISO C++ has to reserve posix namespace because it is the OS standard.

https://github.com/llvm/llvm-project/pull/96417


More information about the cfe-commits mailing list