<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:0in;
        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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.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><!--[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-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Jordan,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">GetSourceVersion and GetRepositoryPath are still used by clang/lib/Basic/Makefile, so we should not delete them.  Your original thought--have make and CMake
 use the same scripts—was laudable, but we'd have to do something like rewrite this stuff in Python to make it both multi-platform and multi-build-tools compatible.  I don't have the Python chops for that, but if somebody else wants to do it, I'm happy to throw
 away my stuff.<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">So, I used separate git-svn commands because I was first adapting code from VersionFromVCS.cmake (which uses git svn log) and then translating GetRepositoryPath
 into CMake (which uses git svn info) and finally filling in the holes regarding getting both bits of info for the 3 source-control options.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">But of course 'git svn info' has both the URL and the revision, so rejiggering the regex stuff to extract it all from one git command would be preferable.<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">How does the pure git case "regress" from what GetRepositoryPath does?  GetRepositoryPath looks for the "git remote –v" line with "fetch" in it, then prints
 the URL from that line.  I thought my CMake code would do the same.  Or should I not be looking for the text "origin"?  I was seeing that in my git repo, but I'm not exactly a sophisticated git user.  Maybe I should have that match any non-whitespace string?<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'll try to get a revised patch out in the next day or so.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--paulr<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Jordan Rose [mailto:jordan_rose@apple.com]
<br>
<b>Sent:</b> Monday, December 01, 2014 11:19 AM<br>
<b>To:</b> Robinson, Paul<br>
<b>Cc:</b> Sean Silva; llvm-commits@cs.uiuc.edu<br>
<b>Subject:</b> Re: [PATCH] Fix Windows build<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thanks, Paul. I figured the situation would be no worse on Windows than it currently is, but this is obviously better. I am wondering why you decided to use "git svn log" to find the revision number followed by "git svn info" to get the
 repository, since the GetSourceVersion script uses "git svn info" for the revision already. I also think it's worth not regressing what GetRepositoryPath supports for the pure git case—that's the configuration a lot of people use for internal branches (including
 Apple).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">After this change, I would actually delete the GetSourceVersion and GetRepositoryPath scripts. They're not being used by LLVM itself for anything else, and they're not cross-platform.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I don't mind changing the macro names (in a separate patch). I didn't like them either. :-)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Jordan<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Dec 1, 2014, at 7:01 , Robinson, Paul <<a href="mailto:Paul_Robinson@playstation.sony.com">Paul_Robinson@playstation.sony.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">+Jordan as he's the last one to muck with GetSVN.cmake.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<div>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span></span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><a href="mailto:llvm-commits-bounces@cs.uiuc.edu"><span style="color:purple">llvm-commits-bounces@cs.uiuc.edu</span></a><span class="apple-converted-space"> </span>[<a href="mailto:llvm-commits-bounces@cs.uiuc.edu"><span style="color:purple">mailto:llvm-commits-bounces@cs.uiuc.edu</span></a>]<span class="apple-converted-space"> </span><b>On
 Behalf Of<span class="apple-converted-space"> </span></b>Robinson, Paul<br>
<b>Sent:</b><span class="apple-converted-space"> </span>Sunday, November 30, 2014 1:58 PM<br>
<b>To:</b><span class="apple-converted-space"> </span>Sean Silva<br>
<b>Cc:</b><span class="apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu"><span style="color:purple">llvm-commits@cs.uiuc.edu</span></a><br>
<b>Subject:</b><span class="apple-converted-space"> </span>RE: [PATCH] Fix Windows build</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div style="margin-left:.5in">
<p class="MsoNormal">I have attached the output with a git-svn repo on Mac. Looks fine<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks for testing it!  (But you didn't actually say LGTM so leaving this open.)</span><o:p></o:p></p>
</div>
<div style="margin-left:.5in">
<p class="MsoNormal">(except for the awkwardness of calling the macros SVN_REVISION and SVN_REPOSITORY; could you change the name of those in a follow-on patch?).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The GetSVN.cmake script doesn't decide on those names; they're determined by the caller.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">In this case the generated header is private to clang/lib/Basic and IIRC is used by only one module within Basic; so I don’t see any value in changing the names.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">They refer to "our (i.e. clang's) SVN revision, and that other project's (i.e. LLVM's) SVN revision."  Seems clear enough to me in context.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--paulr</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
</div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<div>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> </span></span><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Sean
 Silva [<a href="mailto:chisophugis@gmail.com"><span style="color:purple">mailto:chisophugis@gmail.com</span></a>]<span class="apple-converted-space"> </span><br>
<b>Sent:</b><span class="apple-converted-space"> </span>Wednesday, November 26, 2014 5:47 PM<br>
<b>To:</b><span class="apple-converted-space"> </span>Robinson, Paul<br>
<b>Cc:</b><span class="apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu"><span style="color:purple">llvm-commits@cs.uiuc.edu</span></a><br>
<b>Subject:</b><span class="apple-converted-space"> </span>Re: [PATCH] Fix Windows build</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">I have attached the output with a git-svn repo on Mac. Looks fine (except for the awkwardness of calling the macros SVN_REVISION and SVN_REPOSITORY; could you change the name of those in a follow-on patch?).<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">-- Sean Silva<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">On Wed, Nov 26, 2014 at 5:09 PM, Robinson, Paul <<a href="mailto:Paul_Robinson@playstation.sony.com" target="_blank"><span style="color:purple">Paul_Robinson@playstation.sony.com</span></a>> wrote:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Revised patch that I'm pretty sure will handle straight git.<br>
I'd appreciate somebody trying it with a git-svn clone, though.<br>
Thanks,<br>
--paulr<o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><br>
> -----Original Message-----<br>
> From: Robinson, Paul<br>
> Sent: Wednesday, November 26, 2014 4:15 PM<br>
> To: Robinson, Paul;<span class="apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu"><span style="color:purple">llvm-commits@cs.uiuc.edu</span></a><br>
> Subject: RE: [PATCH] Fix Windows build<br>
><br>
> With patch...<br>
><br>
> > -----Original Message-----<br>
> > From:<span class="apple-converted-space"> </span><a href="mailto:llvm-commits-bounces@cs.uiuc.edu"><span style="color:purple">llvm-commits-bounces@cs.uiuc.edu</span></a><span class="apple-converted-space"> </span>[mailto:<a href="mailto:llvm-commits-"><span style="color:purple">llvm-commits-</span></a><br>
> ><span class="apple-converted-space"> </span><a href="mailto:bounces@cs.uiuc.edu"><span style="color:purple">bounces@cs.uiuc.edu</span></a>] On Behalf Of Robinson, Paul<br>
> > Sent: Wednesday, November 26, 2014 4:12 PM<br>
> > To:<span class="apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu"><span style="color:purple">llvm-commits@cs.uiuc.edu</span></a><br>
> > Subject: [PATCH] Fix Windows build<br>
> ><br>
> > r222391 updated GetSVN.cmake to run the LLVM helper scripts<br>
> > GetSourceVersion<br>
> > and GetRepositoryPath.  However, being shell scripts, they work only on<br>
> > Unix-y hosts; on Windows they don't work, you end up with an<br>
> > SVNVersion.inc<br>
> > that looks like this:<br>
> ><br>
> > #define LLVM_REVISION ""<br>
> > #define LLVM_REPOSITORY ""<br>
> > #define SVN_REVISION ""<br>
> > #define SVN_REPOSITORY ""<br>
> ><br>
> > I've rewritten the scripts as best I can into CMake so they will work on<br>
> > Windows as well.  Now I get a better-looking SVNVersion.inc:<br>
> ><br>
> > #define LLVM_REVISION "222770"<br>
> > #define LLVM_REPOSITORY "<a href="http://llvm.org/svn/llvm-project/llvm/trunk" target="_blank"><span style="color:purple">http://llvm.org/svn/llvm-project/llvm/trunk</span></a>"<br>
> > #define SVN_REVISION "222770"<br>
> > #define SVN_REPOSITORY "<a href="http://llvm.org/svn/llvm-project/cfe/trunk" target="_blank"><span style="color:purple">http://llvm.org/svn/llvm-project/cfe/trunk</span></a>"<br>
> ><br>
> > I can only test it on SVN, but I was able to clone code from another<br>
> > CMake script so I'm pretty hopeful that it works for Git as well.<br>
> ><br>
> > Thanks,<br>
> > --paulr<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > llvm-commits mailing list<br>
> ><span class="apple-converted-space"> </span><a href="mailto:llvm-commits@cs.uiuc.edu"><span style="color:purple">llvm-commits@cs.uiuc.edu</span></a><br>
> ><span class="apple-converted-space"> </span><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank"><span style="color:purple">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</span></a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu"><span style="color:purple">llvm-commits@cs.uiuc.edu</span></a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank"><span style="color:purple">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</span></a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>