<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 25, 2018 at 4:21 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class="gmail-"><br><blockquote type="cite"><div>On Jan 25, 2018, at 16:18, Duncan P. N. Exon Smith via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:</div><br class="gmail-m_-5868560740122707126Apple-interchange-newline"><div><div style="word-wrap:break-word"><br><div><br><blockquote type="cite"><div>On Jan 25, 2018, at 13:07, Don Hinton <<a href="mailto:hintonda@gmail.com" target="_blank">hintonda@gmail.com</a>> wrote:</div><br class="gmail-m_-5868560740122707126Apple-interchange-newline"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 25, 2018 at 12:54 PM, Chris Bieneman <span dir="ltr"><<a href="mailto:beanz@apple.com" target="_blank">beanz@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">Historically we have supported building libcxx without llvm-config available on the system.<div><br></div><div>In all likelihood the bots didn't fail because the bots do have llvm-config because we usually require an llvm build or source checkout in order to build and run the tests since tests depend on lit and gtest.</div></div></blockquote><div><br></div><div>Ah, okay, but if the bots don't test/enforce this, does it make sense to continue to support building without llvm-config?<br></div></div></div></div></div></blockquote><div><br></div>I didn't realize we didn't have a bot enforcing this.  I just made one:<div><a href="http://lab.llvm.org:8080/green/view/Libcxx/job/libcxx_master_cmake_standalone" target="_blank">http://lab.llvm.org:8080/<wbr>green/view/Libcxx/job/libcxx_<wbr>master_cmake_standalone</a></div><div><div><br></div></div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I don't want to break upstream users, but the alternative is to duplicate this logic across multiple sub-projects.  (see <a href="http://lists.llvm.org/pipermail/llvm-dev/2018-January/120707.html" target="_blank">http://lists.llvm.org/<wbr>pipermail/llvm-dev/2018-<wbr>January/120707.html</a> for a related rpath issue).</div></div></div></div></div></blockquote><div><br></div><div>It's temporary though.  In the brave new world on GitHub with monorepo, the runtime libraries will be able to access a shared set of CMake configuration scripts.</div></div></div></div></blockquote><div><br></div></span><div>Note that there's other stuff duplicated in the runtime libraries, such as preprocessor definitions (LLVM_... => __LIBCXX_...), that we'll never really be able to collapse.</div></div></div></blockquote><div><br></div><div>Great, I've changed it to this:</div><div><br></div><div><div>+  if(LLVM_FOUND)</div><div>+    llvm_setup_rpath(cxx_shared)</div><div>+  endif()</div></div><div><br></div><div>Which should work for both cases.  Is that okay?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div><div class="gmail-h5"><div style="word-wrap:break-word"><div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><span class="gmail-m_-5868560740122707126gmail-HOEnZb"><font color="#888888"><br><div><br></div></font></span><div><span class="gmail-m_-5868560740122707126gmail-HOEnZb"><font color="#888888">-Chris</font></span><div><div class="gmail-m_-5868560740122707126gmail-h5"><br><div><br><blockquote type="cite"><div>On Jan 25, 2018, at 12:51 PM, Don Hinton <<a href="mailto:hintonda@gmail.com" target="_blank">hintonda@gmail.com</a>> wrote:</div><br class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252Apple-interchange-newline"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 25, 2018 at 12:29 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div></div><div><div>I don't really understand why, but our bots seemed to survive this:</div><div><a href="http://lab.llvm.org:8080/green/view/Libcxx/job/libcxx_master_cmake/2137/" target="_blank">http://lab.llvm.org:8080/green<wbr>/view/Libcxx/job/libcxx_master<wbr>_cmake/2137/</a></div><div><br></div><div>Console output is here:</div><div><a href="http://lab.llvm.org:8080/green/view/Libcxx/job/libcxx_master_cmake/2137/consoleFull" target="_blank">http://lab.llvm.org:8080/green<wbr>/view/Libcxx/job/libcxx_master<wbr>_cmake/2137/consoleFull</a></div><div><br></div><div>That doesn't necessarily mean it's safe.  Does anyone know why this might have "worked"?</div></div></div></blockquote><div><br></div><div>I'm not an expert, but llvm installs all of these cmake modules along side llvm-config, so if you find llvm-config, you find these modules.</div><div><br></div><div>So, unless I'm missing something, it looks like AddLLVM.cmake is always available.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><div><div class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252h5"><div><br><blockquote type="cite"><div>On Jan 25, 2018, at 11:02, Shoaib Meenai <<a href="mailto:smeenai@fb.com" target="_blank">smeenai@fb.com</a>> wrote:</div><br class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252m_4857861198779353090Apple-interchange-newline"><div><div class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252m_4857861198779353090WordSection1" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)"><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif">This is going to break building libc++ standalone (i.e. without any LLVM repository or even its CMake modules), right? Some upstream users care a lot about that use case (CC beanz and Duncan).<u></u><u></u></div><div style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(181,196,223);padding:3pt 0in 0in"><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><b><span style="font-size:12pt">From:<span class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252m_4857861198779353090Apple-converted-space"> </span></span></b><span style="font-size:12pt">cfe-commits <<a href="mailto:cfe-commits-bounces@lists.llvm.org" style="color:purple;text-decoration:underline" target="_blank">cfe-commits-bounces@lists.llv<wbr>m.org</a>> on behalf of Don Hinton via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" style="color:purple;text-decoration:underline" target="_blank">cfe-commits@lists.llvm.org</a>><br><b>Reply-To:<span class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252m_4857861198779353090Apple-converted-space"> </span></b>Don Hinton <<a href="mailto:hintonda@gmail.com" style="color:purple;text-decoration:underline" target="_blank">hintonda@gmail.com</a>><br><b>Date:<span class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252m_4857861198779353090Apple-converted-space"> </span></b>Thursday, January 25, 2018 at 10:15 AM<br><b>To:<span class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252m_4857861198779353090Apple-converted-space"> </span></b>"<a href="mailto:cfe-commits@lists.llvm.org" style="color:purple;text-decoration:underline" target="_blank">cfe-commits@lists.llvm.or<wbr>g</a>" <<a href="mailto:cfe-commits@lists.llvm.org" style="color:purple;text-decoration:underline" target="_blank">cfe-commits@lists.llvm.org</a>><br><b>Subject:<span class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252m_4857861198779353090Apple-converted-space"> </span></b>[libcxx] r323453 - [cmake] [libcxx] Call llvm_setup_rpath() when adding shared libraries.<u></u><u></u></span></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">Author: dhinton<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">Date: Thu Jan 25 10:13:26 2018<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">New Revision: 323453<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">URL:<span class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252m_4857861198779353090Apple-converted-space"> </span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D323453-26view-3Drev&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=zwvSmk9ZIfMARYg3JvYvNuA0Iz-PEq3H2i_ICF6vsR8&s=LDCu89byjNdZWoCIYHGHaPr3IamIdHLF0JwbnYE92vM&e=" style="color:purple;text-decoration:underline" target="_blank">https://urldefense.proofp<wbr>oint.com/v2/url?u=http-3A__llv<wbr>m.org_viewvc_llvm-2Dproject-<wbr>3Frev-3D323453-26view-3Drev&d=<wbr>DwIGaQ&c=5VD0RTtNlTh3ycd41b3MU<wbr>w&r=o3kDXzdBUE3ljQXKeTWOMw&m=<wbr>zwvSmk9ZIfMARYg3JvYvNuA0Iz-PEq<wbr>3H2i_ICF6vsR8&s=LDCu89byjNdZWo<wbr>CIYHGHaPr3IamIdHLF0JwbnYE92vM&<wbr>e=</a><u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">Log:<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">[cmake] [libcxx] Call llvm_setup_rpath() when adding shared libraries.<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">Clang and llvm already use llvm_setup_rpath(), so this change will<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">help standarize rpath usage across all projects.<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">Differential Revision:<span class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252m_4857861198779353090Apple-converted-space"> </span><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D42459&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=zwvSmk9ZIfMARYg3JvYvNuA0Iz-PEq3H2i_ICF6vsR8&s=YCR-YJBua5p-4IK05GjHoZUU7aN8UJAFzL2xaz7byyw&e=" style="color:purple;text-decoration:underline" target="_blank">https://urldefense.p<wbr>roofpoint.com/v2/url?u=https-3<wbr>A__reviews.llvm.org_D42459&d=D<wbr>wIGaQ&c=5VD0RTtNlTh3ycd41b3MUw<wbr>&r=o3kDXzdBUE3ljQXKeTWOMw&m=zw<wbr>vSmk9ZIfMARYg3JvYvNuA0Iz-PEq3H<wbr>2i_ICF6vsR8&s=YCR-YJBua5p-4IK0<wbr>5GjHoZUU7aN8UJAFzL2xaz7byyw&e=</a><u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">Modified:<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">    libcxx/trunk/lib/CMakeList<wbr>s.txt<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">Modified: libcxx/trunk/lib/CMakeLists.tx<wbr>t<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">URL:<span class="gmail-m_-5868560740122707126gmail-m_-6286845015493184252m_4857861198779353090Apple-converted-space"> </span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_lib_CMakeLists.txt-3Frev-3D323453-26r1-3D323452-26r2-3D323453-26view-3Ddiff&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=zwvSmk9ZIfMARYg3JvYvNuA0Iz-PEq3H2i_ICF6vsR8&s=Rd7xc2GWS8oyDcm0QshNPTqM3BglPY5_aHMIuCRUt1s&e=" style="color:purple;text-decoration:underline" target="_blank">https://urldefense.proofp<wbr>oint.com/v2/url?u=http-3A__llv<wbr>m.org_viewvc_llvm-2Dproject_<wbr>libcxx_trunk_lib_CMakeLists.tx<wbr>t-3Frev-3D323453-26r1-3D323452<wbr>-26r2-3D323453-26view-3Ddiff&<wbr>d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3<wbr>MUw&r=o3kDXzdBUE3ljQXKeTWOMw&<wbr>m=zwvSmk9ZIfMARYg3JvYvNuA0Iz-<wbr>PEq3H2i_ICF6vsR8&s=Rd7xc2GWS8o<wbr>yDcm0QshNPTqM3BglPY5_aHMIuCRUt<wbr>1s&e=</a><u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">==============================<wbr>==============================<wbr>==================<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">--- libcxx/trunk/lib/CMakeLists.tx<wbr>t (original)<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">+++ libcxx/trunk/lib/CMakeLists.tx<wbr>t Thu Jan 25 10:13:26 2018<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">@@ -222,6 +222,7 @@ set(LIBCXX_TARGETS)<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"># Build the shared library.<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">if (LIBCXX_ENABLE_SHARED)<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">   add_library(cxx_shared SHARED $<TARGET_OBJECTS:cxx_objects>)<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">+  llvm_setup_rpath(cxx_shared<wbr>)<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">   target_link_libraries(cxx_shar<wbr>ed ${LIBCXX_LIBRARIES})<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">   set_target_properties(cxx_shar<wbr>ed<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">     PROPERTIES<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">______________________________<wbr>_________________<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif">cfe-commits mailing list<u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><a href="mailto:cfe-commits@lists.llvm.org" style="color:purple;text-decoration:underline" target="_blank">cfe-commits@lists.llvm.org</a><u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Dcommits&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=zwvSmk9ZIfMARYg3JvYvNuA0Iz-PEq3H2i_ICF6vsR8&s=TPt8bk99XfmUCdi7MBxyguYV6hJg3PsXFCTXyDfGms8&e=" style="color:purple;text-decoration:underline" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__lists.ll<wbr>vm.org_cgi-2Dbin_mailman_listi<wbr>nfo_cfe-2Dcommits&d=DwIGaQ&c=5<wbr>VD0RTtNlTh3ycd41b3MUw&r=o3kDXz<wbr>dBUE3ljQXKeTWOMw&m=zwvSmk9ZIfM<wbr>ARYg3JvYvNuA0Iz-PEq3H2i_ICF6vs<wbr>R8&s=TPt8bk99XfmUCdi7MBxyguYV6<wbr>hJg3PsXFCTXyDfGms8&e=</a><u></u><u></u></div></div><div><div style="margin:0in 0in 0.0001pt 0.5in;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div>
</div></blockquote></div><br></div></div></div></div></div></blockquote></div><br></div></div>
</div></blockquote></div><br></div>______________________________<wbr>_________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br></div></div><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br></div></blockquote></div><br></div></blockquote></div><br></div></div>