do not set our clang timestamp to the timestamp of the clang binary

If the clang binary comes from a package which had been built before
any of our clang related sources were changed the last time, the timestamp
would be older and so there would be no rebuild. So do the stamp handling
the usual way, clang upgrades will work fine, downgrades will not, but
that's the same problem like with downgrading a library and its headers.

To somewhat mitigate the problem (Clang plugin doesn't get cleaned by
'make clean'), include the full Clang version (which includes SVN revision)
in config_clang.h and make all Clang plugin code include that, so
at least configure re-run will trigger a rebuild if necessary.

Change-Id: I993197f79e92e36105092c92c33b2e1db343e975
This commit is contained in:
Luboš Luňák
2013-01-06 18:09:04 +01:00
parent a4298f86f5
commit 62532ad485
6 changed files with 8 additions and 5 deletions

View File

@@ -11,6 +11,8 @@
#ifndef PLUGIN_H
#define PLUGIN_H
#include <config_clang.h>
#include <clang/AST/RecursiveASTVisitor.h>
#if __clang_major__ < 3 || __clang_major__ == 3 && __clang_minor__ < 2