OSDN Git Service

anv: use cache uuid based on the build timestamp.
authorEmil Velikov <emil.velikov@collabora.com>
Tue, 21 Jun 2016 16:43:35 +0000 (17:43 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 7 Jul 2016 15:12:33 +0000 (16:12 +0100)
commitcc2c3504162f534199a822322e15fc91517ba285
treed8af710f5f0cd523625fef767b97f329581d3982
parent66fe2be1f52371688e3954e1f436d91fd6882b73
anv: use cache uuid based on the build timestamp.

Do not rely on the git sha1:
 - its current truncated form makes it less unique
 - it does not attribute for local (Vulkand or otherwise) changes

Use a timestamp produced at the time of build. It's perfectly unique,
unless someone explicitly thinkers with their system clock. Even then
chances of producing the exact same one are very small, if not zero.

v2: Remove .tmp rule. Its not needed since we want for the header to be
regenerated on each time we call make (Eric).

v3:
 - Honour SOURCE_DATE_EPOCH, to make the build reproducible (Michel)
 - Replace the generated header with a define, to prevent needless
builds on consecutive `make' and/or `make install' calls. (Dave)

v4:
 - Keep the timestamp generation at make time. (Jason)

v5:
 - Ensure that file is regenerated on incremental builds.

Cc: Michel Dänzer <michel@daenzer.net>
Cc: Dave Airlie <airlied@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit addb099ce83c9b9909966a5cd364b85cedef1ee1)
configure.ac
src/intel/vulkan/Makefile.am
src/intel/vulkan/anv_device.c