diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 18:31:31 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 18:31:31 +0000 |
commit | ef348fe5461c9b73f9cc64b9be96afde984dd9c7 (patch) | |
tree | 9c8b39823b347da3ecf3857c0a383d8e20edca9d /tools/gn/BUILD.gn | |
parent | 3044628c635aa50b3b8ba3d28890ef8c2e7cef46 (diff) | |
download | chromium_src-ef348fe5461c9b73f9cc64b9be96afde984dd9c7.zip chromium_src-ef348fe5461c9b73f9cc64b9be96afde984dd9c7.tar.gz chromium_src-ef348fe5461c9b73f9cc64b9be96afde984dd9c7.tar.bz2 |
Add implicit hard deps to GN.
Automatically deduce the hard dependency flag from the target type. Code targets never have side effects that require the hard dep flag, and actions almost always do.
This additionally forces all hard deps of all recursive dependencies of a target to be order-only deps of a target. This solves the problem of indirectly depending on an action that generates a source file and depending on the results of that action. Previously (and in GYP) this would result in cases where the first build is wrong.
To avoid an explosion of hard deps on each source file, this adds an input dependency stamp file to coalesce these hard deps, so each source needs only one order-only dependency. This stamp file is written if there are any order-only dependencies, even in cases where there is only one and we might be better off skipping this and writing it directly. The additional performance from doing this didn't seem worth adding the additional complexity for the optimization.
TBR=scottmg@chromium.org
Original review: https://codereview.chromium.org/259353002
Review URL: https://codereview.chromium.org/269463002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267593 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/BUILD.gn')
-rw-r--r-- | tools/gn/BUILD.gn | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/gn/BUILD.gn b/tools/gn/BUILD.gn index 9712706..0d2fdb5 100644 --- a/tools/gn/BUILD.gn +++ b/tools/gn/BUILD.gn @@ -187,6 +187,7 @@ test("gn_unittests") { "ninja_binary_target_writer_unittest.cc", "ninja_copy_target_writer_unittest.cc", "ninja_helper_unittest.cc", + "ninja_target_writer_unittest.cc", "operators_unittest.cc", "parse_tree_unittest.cc", "parser_unittest.cc", |