Chromium Code Reviews| Index: base/BUILD.gn |
| diff --git a/base/BUILD.gn b/base/BUILD.gn |
| index 3bafc89ff1939bffd03a1e487233f4fd31d63a55..abefadf96fdfd40103c0851e63c94c3ff859f46c 100644 |
| --- a/base/BUILD.gn |
| +++ b/base/BUILD.gn |
| @@ -24,6 +24,16 @@ 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" |
| + |
| + # Whether to disable the handle verifier hooks. |
| + # Hookless parts of the handle verifier will still function. |
| + win_disable_handle_verifier_hooks = false |
| +} |
| + |
| if (is_android) { |
| import("//build/config/android/rules.gni") |
| } |
| @@ -961,6 +971,7 @@ component("base") { |
| public_deps = [ |
| ":base_paths", |
| ":base_static", |
| + ":build_date", |
| ":debugging_flags", |
| ] |
| @@ -1875,6 +1886,31 @@ test("base_unittests") { |
| } |
| } |
| +action("build_date") { |
| + script = "//build/write_build_date_header.py" |
| + |
| + # Force recalculation if there's been a change. |
| + inputs = [ |
| + "//build/util/LASTCHANGE", |
|
M-A Ruel
2016/02/09 00:14:13
This is even better.
Zachary Forman
2016/02/09 00:47:18
Still requires running hooks, which is perhaps sub
|
| + ] |
| + outputs = [ |
| + "$target_gen_dir/generated_build_date.h", |
| + ] |
| + |
| + args = |
| + [ rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir) ] |
|
M-A Ruel
2016/02/09 00:14:13
That's what gn format did? That's surprising.
Zachary Forman
2016/02/09 00:47:18
Surprisingly, yes:
$ gn format base/BUILD.gn | sed
|
| + |
| + if (is_official_build) { |
| + args += [ "official" ] |
| + } else { |
| + args += [ "default" ] |
| + } |
| + |
| + if (override_build_date != "N/A") { |
| + args += [ override_build_date ] |
| + } |
| +} |
| + |
| if (enable_nocompile_tests) { |
| nocompile_test("base_nocompile_tests") { |
| sources = [ |