[PATCH] D52538: [MinGW] Allow using ASan

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 1 13:22:56 PDT 2018


rnk added inline comments.


================
Comment at: lib/Driver/ToolChain.cpp:370-373
+  const char *Suffix = Shared ? (Triple.isWindowsGNUEnvironment()
+                                     ? ".dll.a"
+                                     : Triple.isOSWindows() ? ".lib" : ".so")
                               : (IsITANMSVCWindows ? ".lib" : ".a");
----------------
I think these conditionals have outgrown conditional expressions. Maybe just patch it upafterwards with a special case:
```
if (Shared && Triple.isWindowsGNUEnvironment())
  Suffix = ".dll.a";
```


================
Comment at: lib/Driver/ToolChains/MinGW.cpp:234
+      if (Sanitize.needsAsanRt()) {
+        // MinGW always links against a shared CRT.
+        CmdArgs.push_back(
----------------
As in, shared msvcrt? Not shared mingw rt, right?


Repository:
  rC Clang

https://reviews.llvm.org/D52538





More information about the cfe-commits mailing list