[PATCH] clang-cl: Support the run-time selection options (/ML, /MD, /MT et al.)

Hans Wennborg hans at chromium.org
Wed Aug 7 14:36:37 PDT 2013



================
Comment at: include/clang/Driver/CLCompatOptions.td:90
@@ +89,3 @@
+def _SLASH_MD : CLFlag<"MD">,
+  HelpText<"Use multi-threaded DLL-specific run-time">;
+def _SLASH_MDd : CLFlag<"MDd">,
----------------
Reid Kleckner wrote:
> What does "DLL-specific" mean?  I'd probably just say DLL.  I'd also drop the hyphen in "run-time".
Yeah, just "DLL" sounds less weird :)

================
Comment at: include/clang/Driver/CLCompatOptions.td:93
@@ +92,3 @@
+  HelpText<"Use multi-threaded DLL-specific debug run-time">;
+def _SLASH_ML : CLFlag<"ML">,
+  HelpText<"Use single-threaded run-time (default)">;
----------------
Reid Kleckner wrote:
> The single threaded runtimes have been deprecated since the 2005 release, I believe.  MSDN has a note about it:
> http://msdn.microsoft.com/en-us/library/abx4dbyh(v=vs.110).aspx
> 
> I'd drop the /ML[d] options and drop "multi-threaded" from the other help texts.
Silly me, I was looking at the wrong version of the page. Removing /ML[d] and changing the wording.

================
Comment at: lib/Headers/msvcrt_picker.h:26
@@ +25,3 @@
+#define __MSVCRT_PICKER_H
+
+#ifdef _MT
----------------
Reid Kleckner wrote:
> Is it worth adding "#ifndef _MSC_VER #error" or something?  This header is going to get installed along with clang's builtin headers on Unix systems, where people shouldn't be using it unless they're targeting Windows.
Done.

================
Comment at: lib/Headers/msvcrt_picker.h:43
@@ +42,3 @@
+# ifdef _DEBUG
+#  pragma comment(lib, "libcd")
+# else
----------------
Reid Kleckner wrote:
> These files don't exist in 2010 or 12, so I'd drop these the ifdef for it.
Right, this was /ML again. Removed.


http://llvm-reviews.chandlerc.com/D1315



More information about the cfe-commits mailing list