You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Currently we don't pass the /NODEFAULTLIB flag to the linker on MSVC
21
-
// as there's been trouble in the past of linking the C++ standard
22
-
// library required by LLVM. This likely needs to happen one day, but
23
-
// in general Windows is also a more controlled environment than
24
-
// Unix, so it's not necessarily as critical that this be implemented.
20
+
// We don't pass the /NODEFAULTLIB flag to the linker on MSVC
21
+
// as that prevents linker directives embedded in object files from
22
+
// including other necessary libraries.
25
23
//
26
-
// Note that there are also some licensing worries about statically
27
-
// linking some libraries which require a specific agreement, so it may
28
-
// not ever be possible for us to pass this flag.
24
+
// For example, msvcrt.lib embeds a linker directive like:
25
+
// /DEFAULTLIB:vcruntime.lib /DEFAULTLIB:ucrt.lib
26
+
// So that vcruntime.lib and ucrt.lib are included when the entry point
27
+
// in msvcrt.lib is used. Using /NODEFAULTLIB would mean having to
28
+
// manually add those two libraries and potentially further dependencies
29
+
// they bring in.
30
+
//
31
+
// See also https://learn.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=msvc-170#lib
32
+
// for documention on including library dependencies in C/C++ code.
0 commit comments