<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 4, 2020 at 12:58 PM Mehdi AMINI <<a href="mailto:joker.eph@gmail.com" target="_blank">joker.eph@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 4, 2020 at 10:41 AM Isuru Fernando <<a href="mailto:isuruf@gmail.com" target="_blank">isuruf@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 4, 2020 at 12:30 PM Mehdi AMINI via flang-dev <<a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 4, 2020 at 10:17 AM David Truby <<a href="mailto:David.Truby@arm.com" target="_blank">David.Truby@arm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi Mehdi,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
That branch enables out of tree builds; I believe there are people that still rely on those which is why we added that branch in when rewriting the CMake infrastructure.</div></div></blockquote><div><br></div><div>I assume that folks were relying on this before the merge in the monorepo, but are there still reason to maintain this from now on? Can we put an end-date on it?</div><div>I'm trying to figure out if this is just a transition thing or if this is really something useful on the long run (and why).</div></div></div></div></div></div></div></blockquote><div><br></div><div>Most LLVM subprojects have out-of-tree builds. For eg: clang, lld, lldb, libcxx, openmp, clang-rt  and it's a useful option to have.</div></div></div></blockquote><div><br></div><div>But I'd claim that most of them only have this because that was the norm until 6 months ago when everything merged in the monorepo :)</div><div>(builtin/runtime libraries are a different case though, they often must built against a just-built compiler)</div><div><br></div><div>Tim had a good point about the usefulness of it though: scaling the builds of multiple flang variants against the same LLVM. I wonder how fragile / useful is this though (I never done so)? You likely have to disable LLVM_ABI_BREAKING_CHECKS if you're trying to build a Debug flang against a release LLVM (or vice versa). If your LLVM is not a Debug one you also don't have debug info for the LLVM data structure / libraries, this may be limiting when debugging flang.</div></div></div></blockquote><div><br></div><div>It's not only the build type. Some subprojects have cmake options that developers want to check. For eg: clang has lots of options that are specific to clang. <a href="https://github.com/llvm/llvm-project/blob/master/clang/CMakeLists.txt#L266-L275" target="_blank">https://github.com/llvm/llvm-project/blob/master/clang/CMakeLists.txt#L266-L275</a>. This is useful for users too who may want a subproject with a different option from their package manager version or if the subproject is not available from their package manager.<br><br></div><div>Isuru</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div> mlir is an exception.<br></div></div></div></blockquote><div><br></div><div>That's because it is the only project that started *after* the monorepo was a thing and always assumed it.</div><div><br></div><div>-- </div><div>Mehdi</div><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 dir="ltr"><div class="gmail_quote"><div><br></div><div>Isuru<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 dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><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 dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
There's an open review to fix a similar issue as is reported in the discussion you linked but it seems to have stalled on a discussion about whether to continue to force Werror on, perhaps you could take a look at that and comment there if it fixes this issue
 or not?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The review is at <a href="https://reviews.llvm.org/D78306" id="m_4845893839136535236gmail-m_6845407475219700169m_5355210785760705343gmail-m_-8857039069813629959gmail-m_-5884965258417075304gmail-m_9158722584861791062LPlnk861988" target="_blank">https://reviews.llvm.org/D78306</a></div></div></blockquote><div><br></div><div>Thanks, that was roughly what I was about to start doing!</div><div>In general I think we should avoid doing directly `set(CMAKE_CXX_FLAGS ...` and instead use the `add_flag_if_supported` macros provided by LLVM, e.g.: <a href="https://github.com/llvm/llvm-project/blob/master/mlir/lib/CMakeLists.txt#L2" target="_blank">https://github.com/llvm/llvm-project/blob/master/mlir/lib/CMakeLists.txt#L2</a></div><div><br></div><div>Werror is always difficult to maintain because different compilers (and compiler versions) have different handling (possibly even opposite!) warnings. It is a good thing to have for developers, but it may be a bit hostile to users to have it on by default.</div><div><br></div><div>-- </div><div>Mehdi</div><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 dir="ltr"><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
David Truby<br>
</div>
<div id="m_4845893839136535236gmail-m_6845407475219700169m_5355210785760705343gmail-m_-8857039069813629959gmail-m_-5884965258417075304gmail-m_9158722584861791062appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_4845893839136535236gmail-m_6845407475219700169m_5355210785760705343gmail-m_-8857039069813629959gmail-m_-5884965258417075304gmail-m_9158722584861791062divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> flang-dev <<a href="mailto:flang-dev-bounces@lists.llvm.org" target="_blank">flang-dev-bounces@lists.llvm.org</a>> on behalf of Mehdi AMINI via flang-dev <<a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a>><br>
<b>Sent:</b> 04 May 2020 18:12<br>
<b>To:</b> Flang Development List <<a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a>><br>
<b>Subject:</b> [flang-dev] CMake standalone and compile flags</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I was looking into fixing this error that someone has when building flang: <a href="https://llvm.discourse.group/t/error-when-building-with-cmake/935" target="_blank">https://llvm.discourse.group/t/error-when-building-with-cmake/935</a></div>
<div><br>
</div>
<div>Then I noticed that flang/CMakeLists.txt still has this branch: <a href="https://github.com/llvm/llvm-project/blob/master/flang/CMakeLists.txt#L42" target="_blank">https://github.com/llvm/llvm-project/blob/master/flang/CMakeLists.txt#L42</a> ; is there anyone that relies
 on it or can we simplify this file and the way the options are setup?</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>-- </div>
<div>Mehdi</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div></div></div></div></div></div>
_______________________________________________<br>
flang-dev mailing list<br>
<a href="mailto:flang-dev@lists.llvm.org" target="_blank">flang-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev</a><br>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div></div>