phosek added a comment.

In D101479#2733622 <https://reviews.llvm.org/D101479#2733622>, @mstorsjo wrote:

> In D101479#2733434 <https://reviews.llvm.org/D101479#2733434>, @thakis wrote:
>
>> In D101479#2733354 <https://reviews.llvm.org/D101479#2733354>, @mstorsjo 
>> wrote:
>>
>>> Not sure if we want the desicion between static and shared libc++ be 
>>> coupled with `/MT` and `/MD`, as one can quite plausibly want to use e.g. a 
>>> static libc++ with `/MD`.
>>
>> Right, I meant more "how do users pick if they want a statically or 
>> dynamically linked libc++". Sounds like you get a dynamic libc++ by default. 
>> Since Windows doesn't have rpaths afaik, using `-stdlib=libc++` means you'll 
>> get an executable that won't start, unless you know to copy the libc++ dll 
>> next to your executable with this patch as-is, yes?
>
> Yes, that sounds correct.
>
> As for how people choose - I guess unless you resort to trickery - you use 
> whichever is default in the libc++ build that is used.
>
> However, the libc++ headers inject linker directives to pull in the right 
> form of the lib, matching the linkage of the headers. So as long as that 
> isn't disabled, the clang driver shouldn't need to specify any lib to link 
> against at all.

On other platforms the decision whether to use static or shared is controlled 
by `-static-libstdc++`, does CL have a similar flag or shall we support 
`-static-libstdc++` in MSVC driver as well?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101479/new/

https://reviews.llvm.org/D101479

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to