<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Alexey,<br>
<br>
<div class="moz-cite-prefix">On 03/31/2014 09:58 PM, Alexey Samsonov
wrote:<br>
</div>
<blockquote
cite="mid:CAGSYnCMVgaRkuT_guoPQtEhZcUxieU+O5wgQ9FkSFYupwwcG+Q@mail.gmail.com"
type="cite">
<div dir="ltr">On FreeBSD 9.2 I add a couple custom options to
CMAKE_CXX_FLAGS in order to let clang know which header set it
should use, like that:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div class="">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
CC=clang CXX=clang++ cmake \<br>
-DLLVM_TARGETS_TO_BUILD=X86 \<br>
-DCMAKE_CXX_FLAGS="-I/usr/include/c++/4.8.1
-I/usr/include/c++/4.8.1/x86_64-unknown-freebsd9.2"<br>
</blockquote>
<div><br>
</div>
<div>That seems unfortunate - you add x86_64-
headers to CMAKE_CXX_FLAGS, while sanitizers
tests are built in i386 mode.</div>
</div>
</div>
</div>
</blockquote>
<br>
</div>
Not just that. There are several differences between
building llvm and sanitizers tests that I believe should
be taken into account:<br>
</div>
</blockquote>
<div><br>
</div>
<div>Correct. Yes, LLVM (and compiler-rt) can be built with
gcc and with MSVC. Blindly passing CMAKE_CXX_FLAGS</div>
<div>to Clang when building sanitizer unit tests is...
wrong. For now we get away with this (and I decided to
commit the mentioned change),</div>
<div>as sanitizer unit tests are built only on unix with
GCC/Clang.</div>
<div>
<br>
</div>
<div>Hopefully this will soon change, and by default we will
build all compiler-rt libraries and test suites with
just-built Clang. This will allow us to be very specific
about command-line flags. Of course "just-built Clang"
will still need to use system headers and (for unit tests)
even system libraries, so _some_ flags must remain
configurable by the user. But I'd rather work on the
bright future than fix the existing and ugly
clang_compile, clang_link etc. set of rules :) Let me know
if you're OK with this, or you are in desperate need of
the short-term fix (it prevents you from setting up a
buildbot, or smth. like that).</div>
</div>
</div>
</div>
</blockquote>
<br>
(Ed Maste added to CC.)<br>
<br>
Well, since the buildbot is running v9.2:<br>
<br>
lab.llvm.org:8011/builders/sanitizer_x86_64-freeBSD9.2<br>
<br>
it does indeed prevent us from enabling the bot. (Note is that D3031
was supposed to be the last change to commit to enable the
buildbot.) Otherwise, I don't see any problems with waiting for the
changes--given it won't take unreasonably long--as soon as I can do
whatever local changes I need to make things build correctly.<br>
<br>
Thanks.<br>
<br>
-- <br>
<br>
</body>
</html>