Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 793ee6a033a653c8e9553fdfe53da0a8a8cd75eb..a028841c24556fa58743f9604f2303f5fcfd1d8f 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -103,6 +103,18 @@ config("compiler") { |
} |
} |
+ if (is_clang && !is_win) { |
+ # This is here so that all files get recompiled after a clang roll and |
+ # when turning clang on or off. (defines are passed via the command line, |
+ # and build system rebuild things when their commandline changes). Nothing |
+ # should ever read this define. |
+ defines += [ |
+ "CR_CLANG_REVISION=" + |
+ exec_script( |
+ "//tools/clang/scripts/posix-print-revision.py", [], "value") |
+ ] |
+ } |
+ |
# Mac-specific compiler flags setup. |
# ---------------------------------- |
if (is_mac || is_ios) { |