[PATCH] D51885: [CMake] [MinGW] Build address sanitizer for MinGW

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 10 23:29:42 PDT 2018


mstorsjo added a comment.

In https://reviews.llvm.org/D51885#1229544, @mstorsjo wrote:

> In https://reviews.llvm.org/D51885#1229529, @rnk wrote:
>
> > Does it build with GCC, clang, or both?
>
>
> I've only tested with clang. In general I would think that GCC mostly supports most of the same things with `-fms-extensions`, but I haven't tried (I don't know what the state is of actually instrumenting for asan for windows targets in gcc either).


It turns out that GCC actually doesn't support this syntax at all (at least not in a 5.x version). So without that, building with GCC would require much more invasive changes.

Additionally, Clang provides `__debugbreak()` as a builtin when building with -fms-extensions, but GCC doesn't (mingw provides it as an inline function in a header unless the compiler has got it as a builtin).


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D51885





More information about the llvm-commits mailing list