sharadhr wrote:

This is going badly off-topic.

Supporting `--sysroot` with plain Clang is alright and good. Supporting libc++ 
is also good.

But both need to automatically find a **normally-installed** MSVC SDK without a 
GNU-like refactor, and yes, that includes things like `Program Files(x86)`. So 
in other words it needs to work similar to how `/winsysroot` currently does. 

Ideally the argument should simply change the priority of the sysroot lookup 
(which is what `/winsysroot` does anyway) instead of imposing a full GNU-style 
filesystem reorganisation. To address @Andarwinux's and @YexuanXiao's concerns 
it could also directly invoke the linker through the driver while 
simultaneously forwarding the sysroot information. 

Then we can special-case `-stdlib=libc++` to internally set up the include and 
library paths to the sysroot if provided, instead of having the user do it 
manually [as linked 
above](https://github.com/llvm/llvm-project/issues/53004#issuecomment-1207167610).
 Since libc++ is distributed in GNU-style layout, this needs to use the 
resource directory to find the correct path for the headers and libraries. 

This is exactly what @zmodem [first 
asked](https://github.com/llvm/llvm-project/pull/96417?notification_referrer_id=NT_kwDOADlIYLMxMTIwODI4MjkyMTozNzU0MDgw#issuecomment-2200709561),
 and I concur.

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