[Mesa-dev] [PATCH mesa] meson: bring MESA_GIT_SHA1 in line with other build systems

Eric Engestrom eric.engestrom at imgtec.com
Wed Oct 25 11:18:04 UTC 2017


On Wednesday, 2017-10-25 00:02:49 -0700, Jordan Justen wrote:
> On 2017-10-24 14:54:10, Eric Engestrom wrote:
> > Meson's vcs_tag() uses the output of `git describe`, eg.
> >   17.3-branchpoint-5-gfbf29c3cd15ae831e249+
> > 
> > Whereas the other build systems used a script that outputs only the sha1
> > of the HEAD commit, eg.
> >   fbf29c3cd1
> > 
> > Given that this information is used by printing it next to the version
> > number, there's some redundancy here, and inconsistency between build
> > systems.
> 
> So, the GL version string is something like this?
> 
> 4.5 (Core Profile) Mesa 17.4.0-devel (17.3-branchpoint-5-gfbf29c3cd15ae831e249+)

glinfo outputs this for me right now:
GL_VERSION: 2.1 Mesa 17.3.0-devel (git-17.3-branchpoint-48-g346f40319bd4f56d4b26)

> 
> > Bring Meson in line by making it use the same script, with the added
> > advantage of now supporting the MESA_GIT_SHA1_OVERRIDE env var.
> > 
> > Downside is, files using MESA_GIT_SHA1 now have to be rebuilt every
> > time.
> 
> How about having git_sha1_gen.py read the file and skip writing it if
> the content would be the same?

That's a very good idea, one that we should've had a long time ago
instead of hacking this into each build system...

I just implemented this, fixes the issue perfectly.
I'll send the patches after lunch.

Thanks :)


More information about the mesa-dev mailing list