<div dir="ltr">May I ask you to use <a href="http://llvm.org/docs/Phabricator.html">llvm.org/docs/Phabricator.html</a> ? </div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 3, 2014 at 3:07 AM, Kuba Břečka <span dir="ltr"><<a href="mailto:kuba.brecka@gmail.com" target="_blank">kuba.brecka@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Attaching patches.<br>
<span class="HOEnZb"><font color="#888888"><br>
Kuba<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Mon, Jun 2, 2014 at 4:06 PM, Kuba Břečka <<a href="mailto:kuba.brecka@gmail.com">kuba.brecka@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I am trying to play a bit with ASan on OS X and I found out that on<br>
> recent OS X releases, compiler-rt tests fail to build and run with<br>
> CMake. That's because OS X now provides relocatable SDKs with Xcode<br>
> and has no system-wide standard headers/libs. I am aware that<br>
> currently compiler-rt tests are supported only with CMake.<br>
><br>
> There are actually two issues:<br>
><br>
> * Newly built clang binary can't find the platform SDK. Either the<br>
> SDKROOT env has to be set or -isysroot passed on command line.<br>
> * Newly build clang binary can't find c++ headers. It expects to find<br>
> them in "../include/c++" relative to its binary. This issue goes away<br>
> if you put libcxx into "llvm/projects/" and build libcxx<br>
> simultaneously with llvm.<br>
><br>
> My proposed patch adds OS X detection into CMake to add the -isysroot<br>
> parameter and it creates a symlink pointing from the build directory's<br>
> include/c++ into Xcode's toolchain (but only if you don't<br>
> simultaneously build libcxx). It also moves a similar SDKROOT<br>
> detection from clang's lit config into a util function and uses it in<br>
> compiler-rt lit tests as well.<br>
><br>
> One other solution to make the tests build and pass would be to<br>
> enforce OS X users to set their SDKROOT env property (most OS X users<br>
> don't have it set) and lit would need to be changed in a way to<br>
> propagate this env property (it doesn't now). Installing a SDK into a<br>
> system-wide location (e.g. /usr/include) is discouraged and deprecated<br>
> on OS X, although manually installing Xcode Command Line Tools does<br>
> that. Note that this will not solve the other issue (missing c++<br>
> headers).<br>
><br>
> The attached patch is three files, which should go into llvm,<br>
> compiler-rt and clang projects respectively.<br>
><br>
> Kuba Brecka<br>
</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>