Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2679)

Unified Diff: build/config/compiler/BUILD.gn

Issue 558853002: gn: include CR_CLANG_REVISION in defines for clang (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/clang/scripts/posix-print-revision.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | tools/clang/scripts/posix-print-revision.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698