<p dir="ltr">libc++abi can only be compiled by clang. __sync_swap() is a clang builtin. I believe the conclusion of the discussion about replacing those calls with std::atomic ended with deciding we couldn't do it, though I don't remember why.</p>
<p dir="ltr">Looking at the source, I think the warning about uncaught exception congress from libc++ not being able to find the libc++abi headers.</p>
<p dir="ltr">I should also mention that LLVM 3.5 has been released, and you should be using that instead of the release candidate.</p>
<div class="gmail_quote">On Sep 14, 2014 6:09 AM, "Larry Evans" <<a href="mailto:cppljevans@suddenlink.net">cppljevans@suddenlink.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 08/28/2014 02:07 PM, Bill Wendling wrote:<br>
> We had to roll a release candidate 4 for the 3.5 release. It’s up at the normal place:<br>
><br>
>       <a href="http://llvm.org/pre-releases/3.5" target="_blank">http://llvm.org/pre-releases/3.5</a><br>
><br>
> Please test it and report any major bugs you may find.<br>
><br>
> Thanks!<br>
> -bw<br>
><br>
I tried to use libcxxabi, as downloaded from:<br>
<br>
<a href="http://llvm.org/pre-releases/3.5/rc4/libcxxabi-3.5.0rc4.src.tar.xz" target="_blank">http://llvm.org/pre-releases/3.5/rc4/libcxxabi-3.5.0rc4.src.tar.xz</a><br>
<br>
However, on my system:<br>
<br>
~/dwnlds/llvm/3.5/rc4 $ uname -a<br>
Linux lje-OptiPlex-9020 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15<br>
01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux<br>
<br>
after doing cmake then make, getting some error about missing __sync_swap:<br>
<br>
<br>
[ 11%] make[3]: Leaving directory<br>
`/home/evansl/dwnlds/llvm/3.5/rc4/build-variants/Release/cmake-build'<br>
Building C object<br>
projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/absvti2.c.o<br>
make[3]: Entering directory<br>
`/home/evansl/dwnlds/llvm/3.5/rc4/build-variants/Release/cmake-build'<br>
/home/evansl/dwnlds/llvm/3.5/rc4/sources/llvm-3.5.0rc4.src/projects/libcxxabi/src/cxa_default_handlers.cpp:<br>
In function â€˜void (* std::set_unexpected(std::unexpected_handler))()’:<br>
/home/evansl/dwnlds/llvm/3.5/rc4/sources/llvm-3.5.0rc4.src/projects/libcxxabi/src/cxa_default_handlers.cpp:106:52:<br>
error: â€˜__sync_swap’ was not declared in this scope<br>
  return __sync_swap(&__cxa_unexpected_handler, func);<br>
                                                    ^<br>
Also, later getting warning about exception_ptr:<br>
<br>
[ 13%] Building CXX object<br>
projects/libcxx/lib/CMakeFiles/cxx.dir/__/src/exception.cpp.o<br>
[ 13%] Building C object<br>
projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/ffsdi2.c.o<br>
/home/evansl/dwnlds/llvm/3.5/rc4/sources/llvm-3.5.0rc4.src/projects/libcxx/src/exception.cpp:118:9:<br>
warning: #warning is a GCC extension [enabled by default]<br>
 #       warning uncaught_exception not yet implemented<br>
         ^<br>
/home/evansl/dwnlds/llvm/3.5/rc4/sources/llvm-3.5.0rc4.src/projects/libcxx/src/exception.cpp:118:9:<br>
warning: #warning uncaught_exception not yet implemented [-Wcpp]<br>
<br>
<br>
Is the __sync_swap error related to the subject of this post:<br>
<br>
<a href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-May/036861.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-May/036861.html</a><br>
<br>
, and therefore, should the code in the downloaded<br>
libcxxabi-3.5.0rc4.src.tar.xz be updated?  Also, should I worry<br>
about the warnings?<br>
<br>
TIA.<br>
<br>
-regards,<br>
Larry<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div>