<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2019 at 2:33 PM Kostya Kortchinsky <<a href="mailto:kostyak@google.com">kostyak@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Sorry for the late reply, I missed that mail.</div><div>Are you using any special build option that could help narrow down what's going on?</div><div>atomic_helpers.h has been there for quite some time with associated tests, so it's weird that it's only surfacing now.</div><div>The code is only using the compiler's builtins as does sanitizer_common which isn't using latomic either except for old Android. </div></div></blockquote><div><br></div><div>Hi Kostya,</div><div><br></div><div>Not sure what is going on, must be something different about my environment, since I am the only one indicating an issue. Here's how I configure llvm:</div><div><br></div><div>cmake -G Ninja -DCMAKE_C_COMPILER=/usr/bin/clang-4.0 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-4.0  -DLLVM_ENABLE_WERROR=OFF -DLLVM_ENABLE_TERMINFO=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_INSTALL_PREFIX=${installpath}_build/install -DCMAKE_BUILD_TYPE=Debug ${llvmpath}<br></div><div><br></div><div>Where the build compiler is a stock clang 4.0 release installed on my machine.</div><div><br></div><div>Where is the atomic symbol supposed to be resolved from?</div><div><br></div><div>Thanks,</div><div>Teresa </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 28, 2019 at 11:50 AM Teresa Johnson via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">tejohnson added a comment.<br>
<br>
I am getting failures when trying to link these tests, due to missing symbols, e.g.:<br>
<br>
cd projects/compiler-rt/lib/scudo/standalone/tests && ./bin/clang ScudoUnitTestsObjects.wrappers_c_test.cc.i386.o ScudoUnitTestsObjects.scudo_unit_test_main.cc.i386.o ScudoUnitTestsObjects.gtest-all.cc.i386.o lib/libRTScudoCUnitTest.i386.a -o projects/compiler-rt/lib/scudo/standalone/tests/./ScudoCUnitTest-i386-Test -Wl,-allow-shlib-undefined -lstdc++ -pthread -m32<br>
<br>
lib/libRTScudoCUnitTest.i386.a(wrappers_c.cc.o): In function `scudo::atomic_u64::Type scudo::atomic_load<scudo::atomic_u64>(scudo::atomic_u64 const volatile*, scudo::memory_order)':<br>
projects/compiler-rt/lib/scudo/standalone/atomic_helpers.h:66: undefined reference to `__atomic_load_8'<br>
...<br>
<br>
and other missing symbols.<br>
<br>
It passes if I link manually and add in -latomic. Should that be added to the link flags somewhere? How does this work on the bots or elsewhere?<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D63831/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D63831/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D63831" rel="noreferrer" target="_blank">https://reviews.llvm.org/D63831</a><br>
<br>
<br>
<br>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top:2px solid rgb(213,15,37)">Teresa Johnson |</td><td nowrap style="border-top:2px solid rgb(51,105,232)"> Software Engineer |</td><td nowrap style="border-top:2px solid rgb(0,153,57)"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top:2px solid rgb(238,178,17)"><br></td></tr></tbody></table></span></div></div></div></div>