<div dir="ltr">Ah, ignore me please.<div><br></div><div>I should've read the patch.</div><div><br></div><div>/ Asiri</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 9, 2017 at 9:13 AM, Asiri Rathnayake <span dir="ltr"><<a href="mailto:asiri.rathnayake@gmail.com" target="_blank">asiri.rathnayake@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Petr,<div><br></div><div>This is breaking static builds of the libraries, cmake complaints with:</div><div><br></div><div>"CMake Error at projects/libcxxabi/src/<wbr>CMakeLists.txt:134 (target_link_libraries):</div><div>  Target "unwind" of type UTILITY may not be linked into another target.  One</div><div>  may link only to STATIC or SHARED libraries, or to executables with the</div><div>  ENABLE_EXPORTS property set."</div><div><br></div><div>Our build config is:</div><div><br></div><div> -DLLVM_ENABLE_ASSERTIONS=ON -DLIBCXX_ENABLE_ASSERTIONS=ON -DLIBCXXABI_USE_LLVM_UNWINDER=<wbr>ON  -DLIBCXX_ENABLE_SHARED=OFF -DLIBCXXABI_ENABLE_SHARED=OFF -DLIBUNWIND_ENABLE_SHARED=OFF<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>/ Asiri</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 9, 2017 at 2:19 AM, Petr Hosek via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: phosek<br>
Date: Wed Feb  8 20:19:43 2017<br>
New Revision: 294553<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=294553&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=294553&view=rev</a><br>
Log:<br>
[libcxx][CMake] Support in-tree libunwind when building as part of runtimes<br>
<br>
When building as part of runtimes, there is no predefined order in<br>
which the runtimes are loaded, so the targets from other projects<br>
might not be available. We need to rely on HAVE_<name> variables<br>
instead in that case.<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D29575" rel="noreferrer" target="_blank">https://reviews.llvm.org/D2957<wbr>5</a><br>
<br>
Modified:<br>
    libcxx/trunk/CMakeLists.txt<br>
    libcxx/trunk/lib/CMakeLists.tx<wbr>t<br>
<br>
Modified: libcxx/trunk/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=294553&r1=294552&r2=294553&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/libcxx/trunk/CMakeLists.<wbr>txt?rev=294553&r1=294552&r2=<wbr>294553&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- libcxx/trunk/CMakeLists.txt (original)<br>
+++ libcxx/trunk/CMakeLists.txt Wed Feb  8 20:19:43 2017<br>
@@ -158,6 +158,7 @@ option(LIBCXX_ENABLE_ABI_LINKE<wbr>R_SCRIPT<br>
 # Build libc++abi with libunwind. We need this option to determine whether to<br>
 # link with libunwind or libgcc_s while running the test cases.<br>
 option(LIBCXXABI_USE_LLVM_UNW<wbr>INDER "Build and use the LLVM unwinder." OFF)<br>
+option(LIBCXXABI_ENABLE_STATI<wbr>C_UNWINDER "Statically link the LLVM unwinder." OFF)<br>
<br>
 # Target options ------------------------------<wbr>------------------------------<wbr>--<br>
 option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++." ${LLVM_BUILD_32_BITS})<br>
<br>
Modified: libcxx/trunk/lib/CMakeLists.tx<wbr>t<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=294553&r1=294552&r2=294553&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/libcxx/trunk/lib/CMakeLi<wbr>sts.txt?rev=294553&r1=294552&<wbr>r2=294553&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- libcxx/trunk/lib/CMakeLists.tx<wbr>t (original)<br>
+++ libcxx/trunk/lib/CMakeLists.tx<wbr>t Wed Feb  8 20:19:43 2017<br>
@@ -89,9 +89,9 @@ add_library_flags_if(LIBCXX_HA<wbr>VE_CXX_ATO<br>
<br>
 # Add the unwinder library.<br>
 if (LIBCXXABI_USE_LLVM_UNWINDER)<br>
-  if (TARGET unwind_shared)<br>
+  if (NOT LIBCXXABI_ENABLE_STATIC_UNWIND<wbr>ER AND (TARGET unwind_shared OR HAVE_LIBUNWIND))<br>
     add_interface_library(unwind_<wbr>shared)<br>
-  elseif (TARGET unwind_static)<br>
+  elseif (LIBCXXABI_ENABLE_STATIC_UNWIN<wbr>DER AND (TARGET unwind_static OR HAVE_LIBUNWIND))<br>
     add_interface_library(unwind_<wbr>static)<br>
   else()<br>
     add_interface_library(unwind)<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>