sharadhr wrote:

> Using --driver-mode=cl is actually a hybrid mode

`clang`, `clang++`, and `clang-cl` are bit-for-bit exactly the same binaries 
for a given LLVM distribution (try comparing their hashes). The Clang driver 
changes its internal behaviour depending on the binary name itself. 

In fact, `clang-cl` is exactly equal to `clang --driver-mode=cl`.

The way I see it, the OP wants

1. libc++ when targeting `windows-msvc`. This is solved by directly using the 
flag, but then removing the C standard library—that is, `-nostdinc`, sending 
the driver into CL mode, and using the cl-style flag to set up the Windows SDK 
and UCRT directories; 
2. `--sysroot` when targeting the same triplet. I believe this should simply 
alias `-Xmicrosoft-windows-sys-root` and not rely on invasive 
renaming/recasing/moving around of directories. 


https://github.com/llvm/llvm-project/pull/96417
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to