<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Jul 21, 2015 at 5:55 PM Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Paweł Bylica <<a href="mailto:chfast@gmail.com" target="_blank">chfast@gmail.com</a>> writes:<br>
> I can confirm that the issue has been caused by NDEBUG flag. <br>
><br>
> On Mon, Jul 13, 2015 at 6:29 PM Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:<br>
><br>
> The layout of AssertingVH has depended on NDEBUG since 2009, which<br>
> predates any of our efforts to make LLVM's ABI resilient to mismatched<br>
> NDEBUG definitions between LLVM and its users.<br>
><br>
> For now, make sure your definition of NDEBUG matches LLVM's. In the long<br>
> run, we could conceivably do something<br>
> with LLVM_ENABLE_ABI_BREAKING_CHECKS to allow this mismatch.<br>
><br>
> In practice it is very hard to make NDEBUG flag match configs of your project<br>
> and LLVM project. You often need to build debug and release versions of your<br>
> project and LLVM is installed as a debian package or with homebrew. Moreover,<br>
> there is not reliable way of checking if LLVM has been built with or without<br>
> NDEBUG.<br>
<br>
FWIW, `llvm-config --assertion-mode` will tell you whether or not your<br>
LLVM was built with or without NDEBUG.<br></blockquote><div><br></div><div>That's not true in all cases. In case CMAKE_BUILD_TYPE=Release, LLVM_ENABLE_ASSERTIONS=Off and CMAKE_CXX_FLAGS_RELEASE="" llvm-config reports asserts as off but NDEBUG flag is not set.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> Can I do anything more about it? Contributions related to<br>
> LLVM_ENABLE_ABI_BREAKING_CHECKS needed?<br>
><br>
> - Paweł<br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div></div>