Index: base/BUILD.gn |
diff --git a/base/BUILD.gn b/base/BUILD.gn |
index 946d17f3de33bde297556cba53be41b4952e4b89..d9f5e27537db1934b8935bc5c2ff4178136d6713 100644 |
--- a/base/BUILD.gn |
+++ b/base/BUILD.gn |
@@ -24,6 +24,12 @@ import("//build/config/ui.gni") |
import("//build/nocompile.gni") |
import("//testing/test.gni") |
+declare_args() { |
+ # Override this value to give a specific build date. |
+ # See //base/build_time.cc for more details. |
+ override_build_date = "N/A" |
+} |
+ |
if (is_android) { |
import("//build/config/android/rules.gni") |
} |
@@ -957,6 +963,7 @@ component("base") { |
public_deps = [ |
":base_paths", |
":base_static", |
+ ":build_date", |
":debugging_flags", |
] |
@@ -1976,6 +1983,25 @@ test("base_unittests") { |
} |
} |
+action("build_date") { |
+ script = "//build/write_build_date_header.py" |
+ outputs = [ |
+ "$target_gen_dir/generated_build_date.h", |
+ ] |
+ |
+ args = |
+ [ rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir) ] |
+ |
+ if (override_build_date != "N/A") { |
+ args += [ "--override" ] |
M-A Ruel
2016/02/01 17:52:28
Does this work?
args += [ "--override", override_b
Zachary Forman
2016/02/02 06:30:38
Yeah, it should. Fixing!
|
+ args += [ override_build_date ] |
+ } else if (is_official_build) { |
+ args += [ "--official" ] |
+ } else { |
+ args += [ "default" ] |
+ } |
+} |
+ |
if (enable_nocompile_tests) { |
nocompile_test("base_nocompile_tests") { |
sources = [ |