Devang Patel
2008-Jul-10 17:47 UTC
[LLVMdev] Including svn version number in --version output
On Jul 9, 2008, at 8:47 PM, Tanya Lattner wrote:> > On Jul 9, 2008, at 6:13 PM, Devang Patel wrote: > >> >> On Jul 9, 2008, at 6:13 PM, Tanya M. Lattner wrote: >> >>> >>> Why not set the VERSUFFIX to be " (Based on Apple Inc. build 5555) >>> (LLVM >>> rXXXX)" >>> >>> Where you set the revision number? >> >> I do not want to set the revision number in a source file every >> time I >> do 'svn update' :) >> > > Ok, so I'm confused. Don't you want the svn revision number to be > shown when you do llvm-gcc --version? So why wouldn't you want to > update it everytime you update and then compile? Shouldn't it match > whatever svn version your build is using?I want build-llvm-gcc-but-rebuild-only-modified-files command to automatically pick up svn revision number, but I do not want to enforce "svn update" wrapper usage, if possible, to store svn revision number somewhere. And I do not want to reuse build number.>>> We currently use LLVM_VERSION_INFO to set this sort of information >>> and to >>> me it makes more sense to have the svn rev number there instead of >>> just >>> saying LLVM build like it does now. >> >> LLVM_VERSION_INFO indicates build numbers. >> > > Well, isn't that what you want? You are basically labeling a build > with an svn revision number. Except instead of making someone set > LLVM_VERSION_INFO you modify it for them when its not set (or use > some other macro).Let's take example of checker build Ted produces on cfe-dev list. He regularly announces checker builds at http://clang.llvm.org/StaticAnalysis.html . The last one is checker-59 and it is not checker-(svn-revision- number). The build number, 59 in this example, is useful for the end user to connect the software build he received. The svn revision number is useful for the developer to track source base in svn. Usually, build number corresponds to a tag in svn tree. We have LLVM_VERSION_INFO to set build number. We need another mechanism to track svn revision numbers. This will even useful when people try to track issues reported by nightly tester, for example.> > Perhaps I am misunderstanding what you want it to show when you do -- > version or how it is set.> -Tanya- Devang
Tanya M. Lattner
2008-Jul-10 18:17 UTC
[LLVMdev] Including svn version number in --version output
>>>> Where you set the revision number? >>> >>> I do not want to set the revision number in a source file every >>> time I >>> do 'svn update' :) >>> >> >> Ok, so I'm confused. Don't you want the svn revision number to be >> shown when you do llvm-gcc --version? So why wouldn't you want to >> update it everytime you update and then compile? Shouldn't it match >> whatever svn version your build is using? > > I want build-llvm-gcc-but-rebuild-only-modified-files command to > automatically pick up svn revision number, but I do not want to > enforce "svn update" wrapper usage, if possible, to store svn revision > number somewhere. And I do not want to reuse build number.I didn't say to force people to use svn update. I'm suggesting to use the svn revision number (via svnversion) as the build number. So that exactly as you are doing in your patch to Makefile.in, but I'm saying to use that svnversion number in the VERSUFFIX.> Let's take example of checker build Ted produces on cfe-dev list. He > regularly announces checker builds at http://clang.llvm.org/StaticAnalysis.html > . The last one is checker-59 and it is not checker-(svn-revision- > number). The build number, 59 in this example, is useful for the end > user to connect the software build he received. The svn revision > number is useful for the developer to track source base in svn. > Usually, build number corresponds to a tag in svn tree. > > We have LLVM_VERSION_INFO to set build number. We need another > mechanism to track svn revision numbers. This will even useful when > people try to track issues reported by nightly tester, for example.A build number can only correlate to a tag in the tree if one exists. In the case you are dealing with, its TOT.. so you only have the revision number to go by. So that can and should be used as the build number. You could come up with some arbitrary number to represent the build, but then you have to provide some mapping back to the developer when they want to track down bugs, so whats the point? Where exactly are you suggesting to put the svnversion number in the version string then? -Tanya
Devang Patel
2008-Jul-10 19:37 UTC
[LLVMdev] Including svn version number in --version output
On Jul 10, 2008, at 11:17 AM, Tanya M. Lattner wrote:> > Where exactly are you suggesting to put the svnversion number in the > version string then?I forgot to include version.c change. Right now, I just append svnversion number at the end. - Devang Index: version.c ==================================================================--- version.c (revision 53385) +++ version.c (working copy) @@ -33,4 +33,4 @@ /* The complete version string, assembled from several pieces. BASEVER, DATESTAMP, and DEVPHASE are defined by the Makefile. */ -const char version_string[] = BASEVER DATESTAMP DEVPHASE VERSUFFIX; +const char version_string[] = BASEVER DATESTAMP DEVPHASE VERSUFFIX SVNVER;
Seemingly Similar Threads
- [LLVMdev] Including svn version number in --version output
- [LLVMdev] Including svn version number in --version output
- [LLVMdev] Including svn version number in --version output
- [LLVMdev] Including svn version number in --version output
- [LLVMdev] Including svn version number in --version output