<div dir="ltr"><div><font face="monospace">Thanks Kostya, using Clang to build itself with ASan enabled, and running my<br></font></div><div><font face="monospace">build container in privileged mode, helped solve a lot of the problems. But I</font></div><div><font face="monospace">now encounter a lot of link errors while testing my stage-2 build:</font><div><font face="monospace"><br></font></div><div><font face="monospace">FAIL: libomp :: api/has_openmp.c (52345 of 54886)<br>******************** TEST 'libomp :: api/has_openmp.c' FAILED ********************<br>Script:<br>--<br>: 'RUN': at line 1';   /home/bryanpkc/llvm-project/build/./bin/clang -fopenmp -pthread -fno-experimental-isel  -I /home/bryanpkc/llvm-project/openmp/runtime/test -I /home/bryanpkc/llvm-project/build/projects/openmp/runtime/src -L /home/bryanpkc/llvm-project/build/lib  -I /h<br>ome/bryanpkc/llvm-project/openmp/runtime/test/ompt /home/bryanpkc/llvm-project/openmp/runtime/test/api/has_openmp.c -o /home/bryanpkc/llvm-project/build/projects/openmp/runtime/test/api/Output/has_openmp.c.tmp -lm -latomic && /home/bryanpkc/llvm-project/build/projects/openmp/runtime/test/api/Output/has_openmp.c.tmp<br>--<br>Exit Code: 1<br><br>Command Output (stdout):<br>--<br>$ ":" "RUN: at line 1"<br>$ "/home/bryanpkc/llvm-project/build/./bin/clang" "-fopenmp" "-pthread" "-fno-experimental-isel" "-I" "/home/bryanpkc/llvm-project/openmp/runtime/test" "-I" "/home/bryanpkc/llvm-project/build/projects/openmp/runtime/src" "-L" "/home/bryanpkc/llvm-project/build/lib" "-I" "/home/bryanpkc/llvm-project/openmp/runtime/test/ompt" "/home/bryanpkc/llvm-project/openmp/runtime/test/api/has_openmp.c" "-o" "/home/bryanpkc/llvm-project/build/projects/openmp/runtime/test/api/Output/has_openmp.c.tmp" "-lm" "-latomic"<br># command stderr:<br>/usr/bin/ld: /home/bryanpkc/llvm-project/build/lib/libomp.so: undefined reference to `__asan_load_cxx_array_cookie'<br>/usr/bin/ld: /home/bryanpkc/llvm-project/build/lib/libomp.so: undefined reference to `__asan_set_shadow_f8'<br>/usr/bin/ld: /home/bryanpkc/llvm-project/build/lib/libomp.so: undefined reference to `__asan_stack_malloc_8'<br>/usr/bin/ld: /home/bryanpkc/llvm-project/build/lib/libomp.so: undefined reference to `__asan_stack_malloc_2'<br>/usr/bin/ld: /home/bryanpkc/llvm-project/build/lib/libomp.so: undefined reference to `__asan_unregister_globals'<br></font><div><font face="monospace"><br></font></div><div><font face="monospace">This type of failures are affecting multiple groups of tests:</font></div><div><font face="monospace"><br></font></div><div><font face="monospace">Builtins-aarch64-linux :: *</font></div><div><font face="monospace">LLVM :: tools/gold/X86/*</font></div><div><font face="monospace">libomp :: *</font></div><div><font face="monospace">libomptarget :: *</font></div><div><font face="monospace"><br></font></div><div><div><font face="monospace">Any ideas? Could you point me to the build bot that has a good Clang/LLVM/OpenMP</font></div><div><font face="monospace">configuration with ASan enabled? Unfortunately the documentation at</font></div><div><font face="monospace"><a href="https://llvm.org/docs/CMake.html">https://llvm.org/docs/CMake.html</a> is not clear on how to get this working.<br></font></div><div><font face="monospace"><br clear="all"></font><div><div dir="ltr" data-smartmail="gmail_signature"><font face="monospace">--<br>Bryan</font></div></div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 20, 2020 at 12:33 PM Kostya Serebryany <<a href="mailto:kcc@google.com" target="_blank">kcc@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">Hi Bryan, <div><br></div><div>Yes, building LLVM with GCC+ASAN is a warranty void zone. </div><div>It can probably be made to work with some effort, but unless someone is willing to </div><div>maintain a public bot with this build, it will remain unsupported.</div><div><br></div><div>Building LLVM with LLVM+ASAN is fully supported, and the bots are maintained. </div><div><br></div><div>thanks! </div><div><br></div><div>--kcc </div><div> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 20, 2020 at 7:39 AM Bryan Chan via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.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"><div dir="ltr">Hi lists,<div><br></div><div>I am encountering a large number of check-clang failures after building Clang/LLVM with <span style="color:rgb(0,0,0);white-space:pre-wrap">-DLLVM_USE_SANITIZER=Address. </span>I have reported the issue on Bugzilla (<a href="https://bugs.llvm.org/show_bug.cgi?id=47678" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=47678</a>). I cannot even compile helloworld.c with the resulting clang tool without a lot of false positives from ASan. Is it because I am not supposed to use GCC's AddressSanitizer when building Clang?</div><div><br clear="all"><div><div dir="ltr">--<br>Bryan</div></div></div></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>
</blockquote></div>