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

Side by Side Diff: tools/gn/ninja_action_target_writer.h

Issue 505353002: Reduce input dependencies in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/gn/ninja_action_target_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TOOLS_GN_NINJA_ACTION_TARGET_WRITER_H_ 5 #ifndef TOOLS_GN_NINJA_ACTION_TARGET_WRITER_H_
6 #define TOOLS_GN_NINJA_ACTION_TARGET_WRITER_H_ 6 #define TOOLS_GN_NINJA_ACTION_TARGET_WRITER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 21 matching lines...) Expand all
32 // Writes the Ninja rule for invoking the script. 32 // Writes the Ninja rule for invoking the script.
33 // 33 //
34 // Returns the name of the custom rule generated. This will be based on the 34 // Returns the name of the custom rule generated. This will be based on the
35 // target name, and will include the string "$unique_name" if there are 35 // target name, and will include the string "$unique_name" if there are
36 // multiple inputs. 36 // multiple inputs.
37 std::string WriteRuleDefinition(); 37 std::string WriteRuleDefinition();
38 38
39 // Writes the rules for compiling each source, writing all output files 39 // Writes the rules for compiling each source, writing all output files
40 // to the given vector. 40 // to the given vector.
41 // 41 //
42 // implicit_deps is a precomputed string of all ninja files that are common 42 // input_dep is a file expressing the depencies common to all build steps.
43 // to each build step, it starts with a "|" if it's nonempty. 43 // It will be a stamp file if there is more than one.
44 void WriteSourceRules(const std::string& custom_rule_name, 44 void WriteSourceRules(const std::string& custom_rule_name,
45 const std::string& implicit_deps, 45 const OutputFile& input_dep,
46 std::vector<OutputFile>* output_files); 46 std::vector<OutputFile>* output_files);
47 47
48 // Writes the output files generated by the output template for the given 48 // Writes the output files generated by the output template for the given
49 // source file. This will start with a space and will not include a newline. 49 // source file. This will start with a space and will not include a newline.
50 // Appends the output files to the given vector. 50 // Appends the output files to the given vector.
51 void WriteOutputFilesForBuildLine(const SourceFile& source, 51 void WriteOutputFilesForBuildLine(const SourceFile& source,
52 std::vector<OutputFile>* output_files); 52 std::vector<OutputFile>* output_files);
53 53
54 void WriteDepfile(const SourceFile& source); 54 void WriteDepfile(const SourceFile& source);
55 55
56 // Path output writer that doesn't do any escaping or quoting. It does, 56 // Path output writer that doesn't do any escaping or quoting. It does,
57 // however, convert slashes. Used for 57 // however, convert slashes. Used for
58 // computing intermediate strings. 58 // computing intermediate strings.
59 PathOutput path_output_no_escaping_; 59 PathOutput path_output_no_escaping_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(NinjaActionTargetWriter); 61 DISALLOW_COPY_AND_ASSIGN(NinjaActionTargetWriter);
62 }; 62 };
63 63
64 #endif // TOOLS_GN_NINJA_ACTION_TARGET_WRITER_H_ 64 #endif // TOOLS_GN_NINJA_ACTION_TARGET_WRITER_H_
OLDNEW
« no previous file with comments | « no previous file | tools/gn/ninja_action_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698