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

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

Issue 2255093004: Make __DATE__ and __TIME__ to evaluate to an empty string. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed the default behavior. Created 4 years, 4 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 | no next file » | 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 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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698