summaryrefslogtreecommitdiffstats
path: root/tools/gn/command_desc.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-19 16:50:52 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-19 16:50:52 +0000
commite9bf4fcb470f7220306c39827fc3fd9be0a27741 (patch)
tree59d2c4de7ab1964d6c421dd014b629ce9bd961e1 /tools/gn/command_desc.cc
parent252e6603f3012cdc8de4a212999ef62660769be7 (diff)
downloadchromium_src-e9bf4fcb470f7220306c39827fc3fd9be0a27741.zip
chromium_src-e9bf4fcb470f7220306c39827fc3fd9be0a27741.tar.gz
chromium_src-e9bf4fcb470f7220306c39827fc3fd9be0a27741.tar.bz2
Add directory extraction to GN path handling.
Some of the mojo templates want to put generated files in the directory corresponding to the source file, rather than the directory containing the BUILD file. Previously, this required putting the BUILD files in the same directory. This patch adds the ability to specify the generated file directory corresponding to the input file in the action_foreach file templates so this can be expressed naturally. For parity, it also adds qquerying for this information via get_path_info. BUG= R=cjhopman@chromium.org Review URL: https://codereview.chromium.org/334333005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278402 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/command_desc.cc')
-rw-r--r--tools/gn/command_desc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gn/command_desc.cc b/tools/gn/command_desc.cc
index d178233..4491920 100644
--- a/tools/gn/command_desc.cc
+++ b/tools/gn/command_desc.cc
@@ -276,7 +276,7 @@ void PrintOutputs(const Target* target, bool display_header) {
std::vector<std::string> output_strings;
FileTemplate file_template = FileTemplate::GetForTargetOutputs(target);
for (size_t i = 0; i < target->sources().size(); i++)
- file_template.ApplyString(target->sources()[i].value(), &output_strings);
+ file_template.Apply(target->sources()[i], &output_strings);
std::sort(output_strings.begin(), output_strings.end());
for (size_t i = 0; i < output_strings.size(); i++) {