<html 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 15 (filtered medium)">
<style><!--
/* 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;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
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>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">The existing throwaway driver uses an environment variable F18_FC to specify the target compiler.  That works well for me with pgf90 and gfortran.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">A command-line option is a little more difficult to use with CMake, but not by much.  You’d have to say:<o:p></o:p></p>
<p class="MsoNormal">FC=”f18 -fc gfortran” cmake …<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The reason that the environment variable is F18_FC instead of FC is because typically FC would be set to f18:<o:p></o:p></p>
<p class="MsoNormal">F18_FC=gfortran FC=f18 cmake …<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If F18_FC is not set, it might be nice for the throwaway driver to issue an error message if it is asked to link a program.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">- Steve<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">pat <pat@lanl.gov><br>
<b>Date: </b>Wednesday, July 8, 2020 at 4:00 PM<br>
<b>To: </b>Steve Scalpone <sscalpone@nvidia.com><br>
<b>Cc: </b>Hal Finkel <hfinkel@anl.gov>, David Truby <David.Truby@arm.com>, flang-dev <flang-dev@lists.llvm.org><br>
<b>Subject: </b>Re: [EXTERNAL] [flang-dev] RFC: LLVM 11 branch<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<table class="MsoNormalTable" border="1" cellpadding="0" style="margin-left:.5in;background:#FFEB9C">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:black">External email: Use caution opening links or attachments</span></b><span style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:black">
</span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in">Somewhere I have a version of the “dummy” driver that allows you to specify the target compiler to hand off to.  I can try and track that code down (as I recall it was pretty simple patch as it used an environment
 variable).   It should be quick to fix in the latest code base and we could potentially also consider making it a CMake settings/parameter if that is an easier (more user friendly) path for use cases we have across the community. 
<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Thoughts?    <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">
<span style="font-size:10.5pt;font-family:"Trebuchet MS",sans-serif;color:black">—Pat<o:p></o:p></span></p>
</div>
</div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:.5in">On Jul 8, 2020, at 4:54 PM, Steve Scalpone via flang-dev <<a href="mailto:flang-dev@lists.llvm.org">flang-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">No objections to removing the dependencies on pgf90; however, I agree that the existing FC mechanism should preserve the ability to use other compilers to generate code.  Camille Coti post a patch to enable linking
 with additional libraries, but it's not integrated anywhere that I know of.  David, if you are going to undertake this change, let me know & I'll fwd the email to you.<br>
<br>
- Steve<br>
<br>
On 7/8/20, 11:46 AM, "flang-dev on behalf of Hal Finkel via flang-dev" <<a href="mailto:flang-dev-bounces@lists.llvm.org">flang-dev-bounces@lists.llvm.org</a> on behalf of
<a href="mailto:flang-dev@lists.llvm.org">flang-dev@lists.llvm.org</a>> wrote:<br>
<br>
   External email: Use caution opening links or attachments<br>
<br>
<br>
   On 7/8/20 3:58 AM, David Truby via flang-dev wrote:<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:.5in">Hi all,<br>
<br>
The LLVM 11 branch is happening soon so we should have a discussion<br>
about what we want Flang to look like in that branch.<br>
<br>
<br>
tldr; I see a couple of issues currently that we should discuss for the<br>
release:<br>
<br>
* Flang defaults to calling a proprietary compiler (pgfortran)<br>
* Flang enables Werror by default<br>
* Shared library builds don't work<br>
<br>
Does anyone else see any other things we should consider that I haven't<br>
listed here?<br>
<br>
To elaborate on my issues list:<br>
<br>
I think it's reasonable for us to leave flang in the release,<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:.5in"><br>
<br>
   Yes, we should make clear that this is essentially in a developer-only<br>
   mode (excepting any specific tests that we want to ask people to run).<br>
<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:.5in"> rather<br>
than for example removing it, and add info in the Release Notes about<br>
the state of Flang (e.g. that it fully parses and semantically analyses<br>
Fortran 2018 code but then calls out to another compiler to build it).<br>
<br>
The biggest issue I see with this is that currently flang defaults to<br>
calling out to a proprietary compiler that many people in an open<br>
source community like LLVM are unlikely to have installed. I would<br>
propose that we either add a CMake flag to select the default compiler<br>
to call out to, or that we rely on the existing mechanism of defining<br>
FC, but that either way we should default to gfortran if no other<br>
compiler is specified. That way we would be calling out to a compiler<br>
that almost anyone interested in Fortran is likely to have installed,<br>
and if not it is at least easily available.<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:.5in"><br>
<br>
   +1<br>
<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:.5in"><br>
The other major issue I forsee is that we currently enable Werror by<br>
default in flang. This is likely to break the release for people<br>
building it with as-yet-unreleased compilers, with downstream<br>
proprietary compilers we haven't tested with, or other unforseen<br>
circumstances. I think there are too many potential issues for Werror<br>
by default to go into a release version of LLVM.<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:.5in"><br>
<br>
   +1<br>
<br>
   I thought that we had consensus to change this.<br>
<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:.5in"><br>
Shared library builds also don't currently work due to a circular<br>
dependency between two libraries. I think it's farily uncontroversial<br>
to say that this should be fixed, and I am happy to start working on it<br>
personally.<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:.5in"><br>
<br>
   Yes, shared-library builds should work.<br>
<br>
   We can also discuss these on Monday's call.<br>
<br>
     -Hal<br>
<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:.5in"><br>
<br>
Does anyone have any thoughts on this?<br>
<br>
Thanks<br>
David Truby<br>
_______________________________________________<br>
flang-dev mailing list<br>
<a href="mailto:flang-dev@lists.llvm.org">flang-dev@lists.llvm.org</a><br>
https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev<o:p></o:p></p>
</blockquote>
<p class="MsoNormal" style="margin-left:.5in"><br>
   --<br>
   Hal Finkel<br>
   Lead, Compiler Technology and Programming Languages<br>
   Leadership Computing Facility<br>
   Argonne National Laboratory<br>
<br>
   _______________________________________________<br>
   flang-dev mailing list<br>
   <a href="mailto:flang-dev@lists.llvm.org">flang-dev@lists.llvm.org</a><br>
   <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev</a><br>
<br>
_______________________________________________<br>
flang-dev mailing list<br>
<a href="mailto:flang-dev@lists.llvm.org">flang-dev@lists.llvm.org</a><br>
https://lists.llvm.org/cgi-bin/mailman/listinfo/flang-dev<o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>