<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;}
/* 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>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I can't speak to the rest, but -framework *is* supported by the Darwin linker (ld64), so I would expect that option to be passed through to the linker at least on Darwin.<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">cfe-dev <cfe-dev-bounces@lists.llvm.org> on behalf of cfe-dev <cfe-dev@lists.llvm.org><br>
<b>Reply-To: </b>David Greene <dag@cray.com><br>
<b>Date: </b>Tuesday, March 5, 2019 at 7:29 AM<br>
<b>To: </b>cfe-dev <cfe-dev@lists.llvm.org><br>
<b>Subject: </b>[cfe-dev] Understanding Options.td<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">I am looking at adding an option that should only be passed by the user<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">at link time.  The option affects how clang behaves and does not get<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">passed to the linker itself.  Clang should warn if the option is given<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">in a non-linking context.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Looking at Driver/Options.td, I see a couple of definitions that might<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">be relevant:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">// LinkerInput - The option is a linker input.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">def LinkerInput : OptionFlag;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">def Link_Group : OptionGroup<"<T/e/s/t/u group>">, DocName<"Linker flags">,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">                 DocBrief<[{Flags that are passed on to the linker}]>;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">I also see some uses of these:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">def hip_device_lib_path_EQ : Joined<["--"], "hip-device-lib-path=">, Group<Link_Group>,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">  HelpText<"HIP device library path">;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">def hip_device_lib_EQ : Joined<["--"], "hip-device-lib=">, Group<Link_Group>,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">  HelpText<"HIP device library">;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">I am not sure how to interpret this.  On the one hand, I imagine the HIP<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">options are options that affect how clang behaves but do not get passed<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">to the linker, so Link_Group seems like the right things to use.  On the<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">other hand, I don't think linkers support a -framework option so maybe<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">LinkerInput is what I should use.  I don't know what "linker input"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">means, nor what "passed on to the linker" means given what I am seeing<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">in Options.td.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Is there some guidance on the use of Flags and Group for options?  What<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">is the right incantation for my needs?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Thanks!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">                            -David<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">_______________________________________________<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">cfe-dev mailing list<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Ddev&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=Io4QkBpxp1wDg8XQBEa_B8jelhDU4NFA2N2taFfCSl0&s=cYHtM_PBjOiwFgXfkO7YurK6hddMsJTvfGEIB0jW2jQ&e=">https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Ddev&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=Io4QkBpxp1wDg8XQBEa_B8jelhDU4NFA2N2taFfCSl0&s=cYHtM_PBjOiwFgXfkO7YurK6hddMsJTvfGEIB0jW2jQ&e=</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
</div>
</body>
</html>