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

via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 19 20:57:32 PDT 2024


trcrsired wrote:

@zmodem ok. let me explain to me why using the same file structure of msvc does not work.

MSVC's built-in headers conflict with Clang's built-in headers so clang cannot use its headers any more.
The headers and libraries are not case-sensitive, which causes issues on operating systems with case-sensitive filesystems.
libcxx is incompatible with this "Windows SDK," as it cannot locate the headers and libraries due to the commented-out paths in the MSVCToolchain.cpp.
The libraries and build systems assume the files are located in sysroot/lib and sysroot/include. Failing to adhere to this structure will disrupt other build systems.

Every of these issue need tweaking. You cannot just download windows sdk and use them on none windows platforms. They don't work.

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


More information about the cfe-commits mailing list