<div dir="ltr">Hi Kuba,<div><br></div><div>Right, I think you need to #ifdef out calls to slow unwinder if SANITIZER_CAN_SLOW_UNWIND is 0.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 26, 2015 at 1:10 AM, Kuba Brecka <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"><div style="word-wrap:break-word"><div>Hi Chris,</div><div>this seems to break my OS X build of compiler-rt:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>$ ninja</div><div>[16/57] Linking CXX shared library lib/clang/3.7.0/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib</div><div>FAILED: : && /usr/bin/c++  -fPIC ... -o lib/clang/3.7.0/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib ...</div><div>Undefined symbols for architecture x86_64:</div><div>  "__sanitizer::BufferedStackTrace::SlowUnwindStack(unsigned long, unsigned int)", referenced from:</div><div>      __sanitizer::BufferedStackTrace::Unwind(unsigned int, unsigned long, unsigned long, void*, unsigned long, unsigned long, bool) in sanitizer_stacktrace_libcdep.cc.o</div><div>  "__sanitizer::BufferedStackTrace::SlowUnwindStackWithContext(unsigned long, void*, unsigned int)", referenced from:</div><div>      __sanitizer::BufferedStackTrace::Unwind(unsigned int, unsigned long, unsigned long, void*, unsigned long, unsigned long, bool) in sanitizer_stacktrace_libcdep.cc.o</div><div>ld: symbol(s) not found for architecture x86_64</div><div>clang: error: linker command failed with exit code 1 (use -v to see invocation)</div></div><div><br></div></blockquote>Note that my CMake configuration is `-DCMAKE_BUILD_TYPE=Debug -DCOMPILER_RT_DEBUG=On`, which looks like is the reason why the buildbots build fine.  They build the release version, and here call to `SlowUnwindStack` is optimized out.<span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">Kuba</font></span><span class=""><br><br><blockquote type="cite"><pre style="white-space:pre-wrap;background-color:rgb(255,255,255)">Author: cbieneman
Date: Wed Jun 24 15:13:44 2015
New Revision: 240586

URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D240586-26view-3Drev&d=AwMFAg&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=6KJ7cDTjsYPUJQVgmelmOXAbPH4HH2QA55wrK90Y86A&s=CYFzT-bjdm2O1oJDi6WcL-RRDoh6gOpa4SVC6tAxKq4&e=" target="_blank">http://llvm.org/viewvc/llvm-project?rev=240586&view=rev</a>
Log:
One more change required to build the sanitizers for iOS.

Summary: _Unwind_Backtrace is not available on iOS, so we should ifdef out the posix implementations of BufferedStackTrace::SlowUnwindStack and BufferedStackTrace::SlowUnwindStackWithContext on iOS.

Reviewers: samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

Differential Revision: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10696&d=AwMFAg&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=6KJ7cDTjsYPUJQVgmelmOXAbPH4HH2QA55wrK90Y86A&s=Spp0vkTnrAn8MapkKglYt7RTCGmkSeSfbf7kbVnF1Ig&e=" target="_blank">http://reviews.llvm.org/D10696</a>
</pre></blockquote><div><br></div></span></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" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div>