<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi David,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I can commit it but I wanted first to double-check that it was a sensible thing to do.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thank you very much,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Roger<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> David Blaikie [mailto:dblaikie@gmail.com]
<br>
<b>Sent:</b> 08 December 2017 18:05<br>
<b>To:</b> Roger Ferrer Ibanez<br>
<b>Cc:</b> llvm-dev; nd<br>
<b>Subject:</b> Re: [llvm-dev] Issue with BUILD_SHARED_LIBS=ON<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Keeping the shared library build working's probably a fine idea, though working around GCC bugs (depending on how ubiquitous they are) might be less so.<br>
<br>
I'd be fine with this patch going in for this case, though. For a one line change there's no need to send a phab review, someone (probably me, I guess) can just apply/commit this directly.<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, Dec 8, 2017 at 1:37 AM Roger Ferrer Ibanez via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Dear all,<br>
<br>
while trying to build llvm with shared libraries using GCC (tested both in<br>
Ubuntu 14.04 and Ubuntu 16.04) as in<br>
<br>
  cmake -G Ninja -DBUILD_SHARED_LIBS=ON<br>
<br>
I run into the following link error<br>
<br>
   lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/PartialInlining.cpp.o: In function `llvm::ForwardDominanceFrontierBase<llvm::BasicBlock>::ForwardDominanceFrontierBase()':<br>
   <path>/llvm/include/llvm/Analysis/DominanceFrontier.h:122: undefined reference to `llvm::DominanceFrontierBase<llvm::BasicBlock, false>::DominanceFrontierBase()'<br>
<br>
This change<br>
<br>
   diff --git a/include/llvm/Analysis/DominanceFrontier.h b/include/llvm/Analysis/DominanceFrontier.h<br>
   index a304dff..e743d2d 100644<br>
   --- a/include/llvm/Analysis/DominanceFrontier.h<br>
   +++ b/include/llvm/Analysis/DominanceFrontier.h<br>
   @@ -52,7 +52,7 @@ protected:<br>
      static constexpr bool IsPostDominators = IsPostDom;<br>
<br>
    public:<br>
   -  DominanceFrontierBase() = default;<br>
   +  DominanceFrontierBase() { }<br>
<br>
      /// getRoots - Return the root blocks of the current CFG.  This may include<br>
      /// multiple blocks if we are computing post dominators.  For forward<br>
<br>
seems to fix the problem and I think is related to this GCC defect<br>
<br>
   <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57728" target="_blank">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57728</a><br>
<br>
I'm unsure about the level of interest in the community when it comes to builds<br>
using shared libraries.  I personally use them because for debug builds, at<br>
link time, they are less demanding in memory. However that alone might not be<br>
enough to justify this change as there are valid workarounds (like not using<br>
shared libraries, building clang with clang, using lld, etc).<br>
<br>
Thoughts? If this is reasonable I will create a Phabricator.<br>
<br>
Kind regards,<br>
Roger<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>