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

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: rebase 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..5680beba57f042cb5f1422a80f95bb12f1dcf2d5 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -166,6 +166,15 @@ config("compiler") {
# Common GCC compiler flags setup.
# --------------------------------
cflags += [ "-fno-strict-aliasing" ] # See http://crbug.com/32204
+
+ # Eliminate build metadata (__DATE__ and __TIME_) for deterministic build.
+ # See https://crbug.com/314403
+ cflags += [
+ "-Wno-builtin-macro-redefined",
Nico 2016/08/24 14:41:12 This looks pretty hacky. Can we instead teach the
+ "-D__DATE__=",
Nico 2016/08/24 14:41:12 __DATE__ and __TIME__ are supposed to be string co
+ "-D__TIME__=",
+ ]
+
cflags_cc += [
# If this is removed then remove the corresponding /Zc:threadSafeInit- for
# Windows.
« 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