<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">One of the benefits of the object library approach for generating the clang dylib is that it was compatible with BUILD_SHARED_LIBS. We had lots of issues with libLLVM where people using BUILD_SHARED_LIBS would make changes that broke it, so I was trying to make the clang dylib in a way that it could always be enabled.<div class=""><br class=""></div><div class="">Do we know where the nested generator expression was coming from?</div><div class=""><br class=""></div><div class="">-Chris<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 12, 2019, at 8:32 AM, Shoaib Meenai <<a href="mailto:smeenai@fb.com" class="">smeenai@fb.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)" class="">
<style class=""><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
<div lang="EN-US" link="blue" vlink="purple" class="">
<div class="WordSection1"><p class="MsoNormal">Oops, sorry about the breakage.<o:p class=""></o:p></p><p class="MsoNormal"><o:p class=""> </o:p></p><p class="MsoNormal">Chris, aren't BUILD_SHARED_LIBS and the combined Clang dylib incompatible? Should we disable building the latter if the former is set?<o:p class=""></o:p></p><p class="MsoNormal"><o:p class=""> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in" class=""><p class="MsoNormal" style="margin-left:.5in"><b class=""><span style="font-size: 12pt;" class="">From:
</span></b><span style="font-size: 12pt;" class="">Alex Bradbury <<a href="mailto:asb@lowrisc.org" class="">asb@lowrisc.org</a>><br class="">
<b class="">Date: </b>Friday, July 12, 2019 at 2:02 AM<br class="">
<b class="">To: </b>Shoaib Meenai <<a href="mailto:smeenai@fb.com" class="">smeenai@fb.com</a>><br class="">
<b class="">Cc: </b>cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a>><br class="">
<b class="">Subject: </b>Re: r365825 - [clang-shlib] Fix clang-shlib for PRIVATE dependencies<o:p class=""></o:p></span></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in"><o:p class=""> </o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">On Thu, 11 Jul 2019 at 22:20, Shoaib Meenai via cfe-commits<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in"><<a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a>> wrote:<o:p class=""></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<div class=""><p class="MsoNormal" style="margin-left:.5in"><o:p class=""> </o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">Author: smeenai<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">Date: Thu Jul 11 14:20:38 2019<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">New Revision: 365825<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in"><o:p class=""> </o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D365825-26view-3Drev&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=ETCU2JhfBcjWz-nbe6LUVSRQR0T1f3wCzxLIhKlMmQo&s=R9NSZG1XQDVSiE0wJUgb1kMUrG6bJkG3v5GDcTdkpAk&e=" class="">
https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D365825-26view-3Drev&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=ETCU2JhfBcjWz-nbe6LUVSRQR0T1f3wCzxLIhKlMmQo&s=R9NSZG1XQDVSiE0wJUgb1kMUrG6bJkG3v5GDcTdkpAk&e=</a>
<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">Log:<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">[clang-shlib] Fix clang-shlib for PRIVATE dependencies<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in"><o:p class=""> </o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">Any static library with a PRIVATE dependency ends up with a<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">$<LINK_ONLY:...> generator expression in its INTERFACE_LINK_LIBRARIES,<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">which won't be evaluated by the $<TARGET_PROPERTY:...>, so we end up<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">with an unevaluated generator expression in the generated build file and<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">Ninja chokes on the dollar sign. Just use the static library directly<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">for its dependencies instead of trying to propagate dependencies<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">manually.<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in"><o:p class=""> </o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">Differential Revision: <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D64579&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=ETCU2JhfBcjWz-nbe6LUVSRQR0T1f3wCzxLIhKlMmQo&s=mutN2zF1KixMEVFjNzG_Q7iVJzG5ECbrU4tX3AKWLVQ&e=" class="">
https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D64579&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=ETCU2JhfBcjWz-nbe6LUVSRQR0T1f3wCzxLIhKlMmQo&s=mutN2zF1KixMEVFjNzG_Q7iVJzG5ECbrU4tX3AKWLVQ&e=</a>
<o:p class=""></o:p></p>
</div>
</blockquote>
<div class=""><p class="MsoNormal" style="margin-left:.5in"><o:p class=""> </o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">This seems to break a -DBUILD_SHARED_LIBS build for me. It fails at<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">the point of linking lib/libclang_shared.so.9svn with errors like:<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">ld.lld: error: undefined symbol: llvm::llvm_unreachable_internal(char<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">const*, char const*, unsigned int)<o:p class=""></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<div class=""><p class="MsoNormal" style="margin-left:.5in">referenced by Attributes.cpp:34 (/home/asb/llvm-project/clang/lib/Basic/Attributes.cpp:34)<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in"> tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o:(clang::attr::getSubjectMatchRuleSpelling(clang::attr::SubjectMatchRule))<o:p class=""></o:p></p>
</div>
</blockquote>
</blockquote>
</blockquote>
<div class=""><p class="MsoNormal" style="margin-left:.5in"><o:p class=""> </o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">ld.lld: error: undefined symbol: llvm::llvm_unreachable_internal(char<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">const*, char const*, unsigned int)<o:p class=""></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<div class=""><p class="MsoNormal" style="margin-left:.5in">referenced by TargetCXXABI.h:168 (/home/asb/llvm-project/clang/include/clang/Basic/TargetCXXABI.h:168)<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in"> tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o:(clang::TargetCXXABI::isMicrosoft() const)<o:p class=""></o:p></p>
</div>
</blockquote>
</blockquote>
</blockquote>
<div class=""><p class="MsoNormal" style="margin-left:.5in"><o:p class=""> </o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">ld.lld: error: undefined symbol: llvm::llvm_unreachable_internal(char<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">const*, char const*, unsigned int)<o:p class=""></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<div class=""><p class="MsoNormal" style="margin-left:.5in">referenced by TargetCXXABI.h:149 (/home/asb/llvm-project/clang/include/clang/Basic/TargetCXXABI.h:149)<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in"> tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o:(clang::TargetCXXABI::isItaniumFamily() const)<o:p class=""></o:p></p>
</div>
</blockquote>
</blockquote>
</blockquote>
<div class=""><p class="MsoNormal" style="margin-left:.5in"><o:p class=""> </o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in">ld.lld: error: undefined symbol: llvm::EnableABIBreakingChecks<o:p class=""></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" class="">
<div class=""><p class="MsoNormal" style="margin-left:.5in">referenced by Attributes.cpp<o:p class=""></o:p></p>
</div>
<div class=""><p class="MsoNormal" style="margin-left:.5in"> tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o:(llvm::VerifyEnableABIBreakingChecks)<o:p class=""></o:p></p>
</div>
</blockquote>
</blockquote>
</blockquote>
<div class=""><p class="MsoNormal" style="margin-left:.5in"><o:p class=""> </o:p></p>
</div>
</div>
</div>
</div></blockquote></div><br class=""></div></body></html>