<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">There is no equivalent to LLVM_HAS_ATOMICS in compiler-rt, and compiler-rt by design has no explicit dependencies on LLVM or Clang, so you can’t just use LLVM_HAS_ATOMICS.<div class=""><br class=""></div><div class="">Probably the best thing to do would be to implement a similar check in compiler-rt and populate a variable COMPILER_RT_HAS_ATOMICS.</div><div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 4, 2015, at 1:55 PM, Xinliang David Li <<a href="mailto:xinliangli@gmail.com" class="">xinliangli@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Loop in Chris for advice.<div class=""><br class=""></div><div class="">Chris, I need a way to enable/disable use of atomic operations for profile library build. The cmake currently defines variable LLVM_HAS_ATOMICS which is set via 'CHECK_CXX_SOURCE_COMPILES(..)' call.  Can this variable be used in library CMakeLists file or is it for host compilation only? If not, what is the best alternatives? I am hesitant  to manually check each one of the arch variants ...</div><div class=""><br class=""></div><div class="">thanks,</div><div class=""><br class=""></div><div class="">David</div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Dec 3, 2015 at 3:55 PM, Xinliang David Li <span dir="ltr" class=""><<a href="mailto:xinliangli@gmail.com" target="_blank" class="">xinliangli@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">I have a pending patch to remove the need for sync_fetch_add operation. After that gets in, I will do more cleanups to make the problem go away.<span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">David</div><div class=""><br class=""></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Dec 3, 2015 at 3:38 PM, Joerg Sonnenberger via llvm-commits <span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Nov 18, 2015 at 06:12:35PM -0000, Betul Buyukkurt via llvm-commits wrote:<br class="">
> Author: betulb<br class="">
> Date: Wed Nov 18 12:12:35 2015<br class="">
> New Revision: 253483<br class="">
><br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=253483&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=253483&view=rev</a><br class="">
> Log:<br class="">
> [PGO] Runtime support for value profiling.<br class="">
><br class="">
> This change adds extends the data structures and adds in the routines<br class="">
> for handling runtime calls for value profiling. The profile data format<br class="">
> is modified and the version number is incremented.<br class="">
<br class="">
</span>This revision has introduced a serious portability regression. Now the<br class="">
instruction profiling code requires the present of 64bit atomics, which<br class="">
simple don't exist on many platforms.<br class="">
<br class="">
Joerg<br class="">
<div class=""><div class="">_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="">
</div></div></blockquote></div><br class=""></div>
</div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>