<div dir="ltr">What version of Clang are you using as the host compiler? It needs to be a reasonably modern one for this option to work.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 9, 2013 at 9:45 AM, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank">nrotem@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Alexey, <div><br></div><div>I am getting this error when I configure using -DLLVM_USE_SANITIZER=Address.  Should I add any other flags ?</div>
<div><br></div><div><p style="font-size:18px;font-family:Menlo;color:rgb(213,59,211)"><b>Scanning dependencies of target LLVMSupport</b></p><p style="font-size:18px;font-family:Menlo;color:rgb(52,189,38)"><span style="color:rgb(0,0,0)">[  0%] </span>Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o</p>
<p style="font-size:18px;font-family:Menlo">clang: error: '-fsanitize-undefined-trap-on-error' required with '-fsanitize=address' option</p><p style="font-size:18px;font-family:Menlo">clang: error: unsupported argument 'address' to option 'fsanitize='</p>
<p style="font-size:18px;font-family:Menlo">make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o] Error 1</p><p style="font-size:18px;font-family:Menlo">make[1]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2</p>
<p style="font-size:18px;font-family:Menlo">make: *** [all] Error 2</p><p style="font-size:18px;font-family:Menlo"><br></p><p style="font-size:18px;font-family:Menlo"><br></p><p style="font-size:18px;font-family:Menlo">Thanks,</p>
<p style="font-size:18px;font-family:Menlo">Nadav</p><p style="font-size:18px;font-family:Menlo"><br></p></div><div class="HOEnZb"><div class="h5"><br><span>On 07/09/13, <b>Alexey Samsonov </b> <<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>> wrote:</span><blockquote style="border-left:1px solid #00f;padding-left:13px;margin-left:0" type="cite">
<div>Author: samsonov<br>Date: Tue Jul  9 05:56:13 2013<br>New Revision: 185925<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=185925&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=185925&view=rev</a><br>
Log:<br>Document LLVM_USE_SANITIZER CMake option<br><br>Modified:<br>    llvm/trunk/docs/CMake.rst<br><br>Modified: llvm/trunk/docs/CMake.rst<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CMake.rst?rev=185925&r1=185924&r2=185925&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CMake.rst?rev=185925&r1=185924&r2=185925&view=diff</a><br>
==============================================================================<br>--- llvm/trunk/docs/CMake.rst (original)<br>+++ llvm/trunk/docs/CMake.rst Tue Jul  9 05:56:13 2013<br>@@ -275,6 +275,11 @@ LLVM-specific variables<br>
   Build with zlib to support compression/uncompression in LLVM tools.<br>   Defaults to ON.<br> <br>+**LLVM_USE_SANITIZER**:STRING<br>+  Define the sanitizer used to build LLVM binaries and tests. Possible values<br>+  are ``Address``, ``Memory`` and ``MemoryWithOrigins``. Defaults to empty<br>
+  string.<br>+<br> Executing the test suite<br> ========================<br> <br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></div></blockquote>
</div></div><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>