<div dir="ltr">Thanks! Submitted as r233122. Let me know (and feel free to revert) if it still breaks Jenkins or another build.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 2:44 PM, Anna Zaks <span dir="ltr"><<a href="mailto:ganna@apple.com" target="_blank">ganna@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="margin:0px"><span style="font-size:14px">Alexey,</span></div><div style="margin:0px"><span style="font-size:14px"><br></span></div><div style="margin:0px"><span style="font-size:14px">I've applied the following patch on top of yours and tested with cmake ninja build plus "ninja check-ubsan" and "ninja check-asan".</span></div><div style="margin:0px"><span style="font-family:Menlo;font-size:11px"><br></span></div><div style="margin:0px"><span style="font-size:14px">Cheers, </span></div><div style="margin:0px"><span style="font-size:14px">Anna.</span><span style="font-family:Menlo;font-size:11px"> </span></div><div style="margin:0px;font-size:11px;font-family:Menlo"><br></div><div style="margin:0px;font-size:11px;font-family:Menlo">zaks$ git diff</div><div style="margin:0px;font-size:11px;font-family:Menlo"><b>diff --git a/CMakeLists.txt b/CMakeLists.txt</b></div><div style="margin:0px;font-size:11px;font-family:Menlo"><b>index 3e67883..c6cd87d 100644</b></div><div style="margin:0px;font-size:11px;font-family:Menlo"><b>--- a/CMakeLists.txt</b></div><div style="margin:0px;font-size:11px;font-family:Menlo"><b>+++ b/CMakeLists.txt</b></div><span class=""><div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,187,199)">@@ -304,8 +304,7 @@<span style="color:#000000"> if(APPLE)</span></div><div style="margin:0px;font-size:11px;font-family:Menlo">   set(DARWIN_iossim_CFLAGS</div><div style="margin:0px;font-size:11px;font-family:Menlo">     -mios-simulator-version-min=7.0 -isysroot ${IOSSIM_SDK_DIR})</div><div style="margin:0px;font-size:11px;font-family:Menlo">   set(DARWIN_osx_LINKFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}</div><div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">-     -stdlib=libc++</div><div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">-     -lc++abi)</div><div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,189,38)">+     -stdlib=libc++)</div><div style="margin:0px;font-size:11px;font-family:Menlo">   set(DARWIN_iossim_LINKFLAGS</div><div style="margin:0px;font-size:11px;font-family:Menlo">     -Wl,-ios_simulator_version_min,7.0.0</div><div style="margin:0px;font-size:11px;font-family:Menlo">     -mios-simulator-version-min=7.0</div></span><div style="margin:0px;font-size:11px;font-family:Menlo"><b>diff --git a/lib/ubsan/CMakeLists.txt b/lib/ubsan/CMakeLists.txt</b></div><div style="margin:0px;font-size:11px;font-family:Menlo"><b>index 8c2d30b..a8b3f61 100644</b></div><div style="margin:0px;font-size:11px;font-family:Menlo"><b>--- a/lib/ubsan/CMakeLists.txt</b></div><div style="margin:0px;font-size:11px;font-family:Menlo"><b>+++ b/lib/ubsan/CMakeLists.txt</b></div><div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,187,199)">@@ -31,7 +31,8 @@<span style="color:#000000"> if(APPLE)</span></div><span class=""><div style="margin:0px;font-size:11px;font-family:Menlo">     add_compiler_rt_darwin_dynamic_runtime(clang_rt.ubsan_${os}_dynamic ${os}</div><div style="margin:0px;font-size:11px;font-family:Menlo">       ARCH ${UBSAN_SUPPORTED_ARCH}</div><div style="margin:0px;font-size:11px;font-family:Menlo">       SOURCES $<TARGET_OBJECTS:RTUbsan.${os}></div></span><div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(195,55,32)">-              $<TARGET_OBJECTS:RTSanitizerCommon.${os}>)</div><div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,189,38)">+              $<TARGET_OBJECTS:RTSanitizerCommon.${os}></div><div style="margin:0px;font-size:11px;font-family:Menlo;color:rgb(52,189,38)">+      LINKFLAGS -lc++abi)</div><p style="margin:0px;font-size:11px;font-family:Menlo;min-height:13px"> <br></p><div style="margin:0px;font-size:11px;font-family:Menlo">     add_dependencies(ubsan clang_rt.ubsan_${os}_dynamic)</div><div style="margin:0px;font-size:11px;font-family:Menlo">   endforeach()</div><div><div class="h5"><div><br></div><div><blockquote type="cite"><div>On Mar 24, 2015, at 11:36 AM, Alexey Samsonov <<a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a>> wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 24, 2015 at 11:24 AM, Anna Zaks<span> </span><span dir="ltr"><<a href="mailto:ganna@apple.com" target="_blank">ganna@apple.com</a>></span><span> </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"><br><div><span><blockquote type="cite"><div>On Mar 24, 2015, at 10:46 AM, Justin Bogner <<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>> wrote:</div><br><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Alexander Potapenko <</span><a href="mailto:glider@google.com" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">glider@google.com</a><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">> writes:</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Author: glider<br>Date: Tue Mar 24 08:10:55 2015<br>New Revision: 233071<br><br>URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project?rev=233071&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=233071&view=rev</a><br>Log:<br>[ASan] Do not link ASan OSX runtime with -lc++abi (which was added in r233036)<br>This should fix the OSX Jenkins build at<br><a href="http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_check/" target="_blank">http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_check/</a><br></blockquote><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">This didn't quite work - compiler-rt doesn't even link after this</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">change:</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important"> Undefined symbols for architecture x86_64:</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">   "typeinfo for __cxxabiv1::__class_type_info", referenced from:</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">       __ubsan::checkDynamicType(void*, void*, unsigned long) in ubsan_type_hash.cc.o</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">       isDerivedFromAtOffset(__cxxabiv1::__class_type_info const*, __cxxabiv1::__class_type_info const*, long) in ubsan_type_hash.cc.o</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">       findBaseAtOffset(__cxxabiv1::__class_type_info const*, long) in ubsan_type_hash.cc.o</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">See here:</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important"> </span><a href="http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_build/2492/consoleFull#-158682280549ba4694-19c4-4d7e-bec5-911270d8a58c" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_build/2492/consoleFull#-158682280549ba4694-19c4-4d7e-bec5-911270d8a58c</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">I've reverted both r233071 and r233036 in r233097 to get things working</span></div></blockquote><blockquote type="cite"><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">again.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"></div></blockquote><div><br></div></span>If we are reverting all this, 233035 needs to be reverted as well.</div></div></blockquote><div><br></div><div>Yes.</div><div><br></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><br></div><div>Maybe we should XFAIL the two tests instead?</div></div></blockquote><div><br></div><div>No, I just think we should provide -lc++abi only for UBSan. I.e. remove it from DARWIN_osx_LINKFLAGS and instead provide:</div><div><div><br></div><div>    add_compiler_rt_darwin_dynamic_runtime(clang_rt.ubsan_${os}_dynamic ${os}</div><div>      ARCH ${UBSAN_SUPPORTED_ARCH}</div><div>      SOURCES $<TARGET_OBJECTS:RTUbsan.${os}></div><div>              $<TARGET_OBJECTS:RTSanitizerCommon.${os}></div><div>      LINKFLAGS -lc++abi)</div></div><div><br></div><div>Could you check if it works?</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><br></div><div>CC-ing Alexey.</div><div><div><div><br><blockquote type="cite"><div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Modified:<br>   compiler-rt/trunk/CMakeLists.txt<br><br>Modified: compiler-rt/trunk/CMakeLists.txt<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=233071&r1=233070&r2=233071&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=233071&r1=233070&r2=233071&view=diff</a><br>==============================================================================<br>--- compiler-rt/trunk/CMakeLists.txt (original)<br>+++ compiler-rt/trunk/CMakeLists.txt Tue Mar 24 08:10:55 2015<br>@@ -304,8 +304,7 @@ if(APPLE)<br>  set(DARWIN_iossim_CFLAGS<br>    -mios-simulator-version-min=7.0 -isysroot ${IOSSIM_SDK_DIR})<br>  set(DARWIN_osx_LINKFLAGS -mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION}<br>-     -stdlib=libc++<br>-     -lc++abi)<br>+     -stdlib=libc++)<br>  set(DARWIN_iossim_LINKFLAGS<br>    -Wl,-ios_simulator_version_min,7.0.0<br>    -mios-simulator-version-min=7.0<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">_______________________________________________</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">llvm-commits mailing list</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="mailto:llvm-commits@cs.uiuc.edu" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">llvm-commits@cs.uiuc.edu</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></div></blockquote></div><br></div></div></div></blockquote></div><br><br clear="all"><div><br></div>--<span> </span><br><div><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div></div></div></div></blockquote></div><br></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div>