<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr"><div><div style="font-family:arial,helvetica,sans-serif;font-size:13px">Hi, Richard!</div><div class="gmail_extra" style="font-family:arial,helvetica,sans-serif;font-size:13px">

<br><div class="gmail_quote"><div>On Fri, Dec 21, 2012 at 7:35 PM, Relph, Richard <span dir="ltr"><<a href="mailto:Richard.Relph@amd.com" target="_blank">Richard.Relph@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div style="word-wrap:break-word">Different, but still failing (this time with Xcode 4.4…)<div><br></div><div><div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">/Users/rrelph/llvm/tot/xcode/bin/Debug/clang sanitizer_allocator_test.cc.i386.o sanitizer_common_test.cc.i386.o sanitizer_flags_test.cc.i386.o sanitizer_libc_test.cc.i386.o sanitizer_list_test.cc.i386.o sanitizer_printf_test.cc.i386.o sanitizer_stackdepot_test.cc.i386.o sanitizer_test_main.cc.i386.o gtest-all.cc.i386.o libRTSanitizerCommon.test.osx.a -o /Users/rrelph/llvm/tot/xcode/projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-i386-Test -lstdc++ -lpthread -m32</div>

<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">clang: error: no such file or directory: 'libRTSanitizerCommon.test.osx.a'</div><div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">

make: *** [/Users/rrelph/llvm/tot/xcode/projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-i386-Test] Error 1</div><div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">Command /bin/sh failed with exit code 2</div>

<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo"><br></div></div></div></blockquote></div><div>We usually use unix makefile generators on Mac, so Xcode build indeed may be broken =/</div><div>Could you send build instructions so that I can reproduce and test this on my Mac?</div>

<div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">

<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo"></div><div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">Additionally, there are still the 8 functions declared noreturn in asan_report.cc that clang expects to "not return". These generate 16 warnings during the ALL_BUILD build and 8 more warnings during the check-all build.</div>

</div></blockquote><div><br></div></div><div>This looks like a known issue: see LLVM revision <span style="font-family:arial,sans-serif">163411 and its discussion on llvm-commits list.</span></div><div><span style="font-family:arial,sans-serif">TL;DR: the compiler is wrong here: the functions are in fact noreturn, because there is a local variable that has a noreturn destructor.</span></div>

<div><span style="font-family:arial,sans-serif">this is already fixed in new Clang, but not in your host compiler.</span></div></div></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div style="word-wrap:break-word"><div><div><div>
<div><br>
</div>
<div>
<div>On Dec 21, 2012, at 12:13 AM, Alexey Samsonov <<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>> wrote:</div>
<br>
<blockquote type="cite">
<div style="font-family:arial,helvetica,sans-serif;font-size:10pt">Hi Richard!
<div><br>
On Thu, Dec 20, 2012 at 12:48 AM, Nick Kledzik <span dir="ltr"><<a href="mailto:kledzik@apple.com" target="_blank">kledzik@apple.com</a>></span> wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div>Those look like the linker is being passed the same .o file built twice, ex:</div>
<div>  <span style="font-family:Menlo;font-size:11px">../Objects-normal/x86_64/asan_globals_test.o</span></div>
<div><span style="font-family:Menlo;font-size:11px"> ../</span><span style="font-family:Menlo;font-size:11px">lib/asan/tests/asan_globals_test.cc.asan.o</span></div>
<div><br>
</div>
<div>So, the symbols are colliding.  Something is set up wrong in the xcode project.</div>
<div><br>
</div>
<div>-Nick</div>
<br>
<div>
<div>
<div>
<div>On Dec 19, 2012, at 9:48 AM, Relph, Richard wrote:</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<div style="word-wrap:break-word">Following a blend of instructions on 3 web pages, I have succeeded in getting LLVM 3.2 (with clang, extras, and compiler-rt) building - but not testing - on Xcode. I used CMake 2.8.10 GUI to create the Xcode project file. Below
 are my notes.
<div><br>
</div>
<div>First, I believe CMake ends up setting things up so that Xcode has 1 warning after scanning the project having to do with hires images or some such… it takes a long time to fix that up in a project as large as this, but I'm not sure there's anything we
 can do about it.</div>
<div>Second, a build of the ALL_BUILD target in Xcode produces 16 warnings about 8 functions declared noreturn, but without a expected __builtin_unreachable() before the end of the function. (The first attempt to build produced 2 errors, the first an unable
 to create directory error for runtime/libprofile/LLVM.build/Debug/profile_rt-static.build/Objects-normal/x86_64; the second a libtool failure… both went away upon a rebuild.)</div>
<div>Third, a build of the check-all target produced 8 warnings about the 8 functions declared noreturn as for ALL_BUILD, and 6 or 7 "errors", mostly from
<a href="http://asan_mac_test.mm/" target="_blank">asan_mac_test.mm</a>. After fixing up these "errors" (int vs. size_t comparisons and malloc being assigned to volatile pointers), I got 372 duplicate symbol errors from this:</div>


<div><br>
</div>
<div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">Ld /Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug/AsanTest normal x86_64</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">    cd /Volumes/Shared/NewShared/llvm/3.2/source</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">    setenv MACOSX_DEPLOYMENT_TARGET 10.8</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
 -L/Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug -F/Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug -filelist /Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/LLVM.build/Debug/AsanTest.build/Objects-normal/x86_64/AsanTest.LinkFileList
 -mmacosx-version-min=10.8 -framework Foundation -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lpthread /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libgtest.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libgtest_main.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libLLVMSupport.a
 /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/clang/3.2/lib/darwin/Debug/libclang_rt.asan_osx.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libgtest.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libLLVMSupport.a -lpthread -fobjc-link-runtime /Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_globals_test.cc.asan.o
 /Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_test.cc.asan.o /Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_mac_test.mm.asan.o -o /Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug/AsanTest</div>


<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo;min-height:13px">
<br>
</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">duplicate symbol __Z11GlobalsTesti in:</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">    /Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/LLVM.build/Debug/AsanTest.build/Objects-normal/x86_64/asan_globals_test.o</div>


<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">    /Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_globals_test.cc.asan.o</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">duplicate symbol _kStartupStr in:</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">    /Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/LLVM.build/Debug/AsanTest.build/Objects-normal/x86_64/asan_mac_test.o</div>


<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">    /Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_mac_test.mm.asan.o</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">and 370 more…</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<div>Recently the way we build ASan unit tests has changed. Could you please check if your XCode build works for the trunk?</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div>
<blockquote type="cite">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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>
<br>
</div>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>Alexey Samsonov, MSK</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div></div></div>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</div></div></div>