Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index a319d6028603d977e05156ddeafa20fe588e4f08..f7e0702cddf758cbc899470e4674834254052bec 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -78,6 +78,11 @@ declare_args() { |
# of binutils can cause linker warning. |
# See: https://bugs.chromium.org/p/chromium/issues/detail?id=457359 |
fatal_linker_warnings = true |
+ |
+ # Keep build metadata (__DATE__ and __TIME_) available. |
+ # For the deterministic build, these parameters should be eliminated. |
+ # See: https://bugs.chromium.org/p/chromium/issues/detail?id=314403 |
+ enable_date_time_builtin_macro = false |
Dirk Pranke
2016/08/22 17:31:45
Does this even need to be easily toggleable? Why n
M-A Ruel
2016/08/22 19:16:53
That's my opinion too, no need for a flag. Less fl
Yoshisato Yanagisawa
2016/08/23 01:37:54
I do not have strong opinions on whether to make i
|
} |
if (is_clang && !is_nacl) { |
@@ -207,6 +212,14 @@ config("compiler") { |
# crbug.com/485542 |
ldflags += [ "-Wl,--fatal-warnings" ] |
} |
+ |
+ if (!enable_date_time_builtin_macro) { |
+ cflags += [ |
+ "-Wno-builtin-macro-redefined", |
+ "-D__DATE__=", |
+ "-D__TIME__=", |
+ ] |
+ } |
} |
if (is_clang && is_debug) { |