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

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

Issue 2284453002: Make compiles fail when __DATE__, __TIME__, or __TIMESTAMP_ are used. (Closed)
Patch Set: disable for nacl, improve comment 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 5e6d53095474bd9dcaaedf8b2d818170ffb79ed7..1a3908c4ad5ec366f6f2edae4ab1e7b3be884b0e 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -964,6 +964,14 @@ config("default_warnings") {
}
}
+ if (!is_nacl && (!is_win || is_clang)) {
+ # Disable __DATE__ and __TIME__ to help make builds deterministic.
+ # Determinism is important, so we should fix compile failures rather
+ # than remove this flag (this is also why this is in :common_warnings
+ # rather than :chromium_code).
+ cflags += [ "-Wdate-time" ]
+ }
+
# Common Clang and GCC warning setup.
if (!is_win || is_clang) {
cflags += [
« 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