[PATCH] D101479: [Driver] Support libc++ in MSVC

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 10 11:30:46 PDT 2021


mstorsjo added a comment.

In D101479#2748189 <https://reviews.llvm.org/D101479#2748189>, @amccarth 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`.
>
> I don't understand this.  When would someone want to use `/MD` and not get the DLL version of the run-time libraries?

Whether one wants to link against the CRT statically or dynamically, and libc++ statically or dynamically, are two entirely separate things. I would e.g. expect that Chrome is built with a statically linked libc++ but linked against the dynamic CRT.

In any case, as the libc++ headers supply autolinking directives that match the declarations (whether they're doing dllimport or not), the driver shouldn't really need to decide, but it's all up to the libc++ installation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101479



More information about the cfe-commits mailing list