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

Unified Diff: tools/gn/ninja_binary_target_writer.h

Issue 2071573003: GN: Use implicit dependency for binary input deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review changes Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/docs/reference.md ('k') | tools/gn/ninja_binary_target_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_binary_target_writer.h
diff --git a/tools/gn/ninja_binary_target_writer.h b/tools/gn/ninja_binary_target_writer.h
index 1876486ff1f9ab38ec58300835b87dcfeb091ce2..0188720138142d16e43d6ed8d1ad01e736852c3e 100644
--- a/tools/gn/ninja_binary_target_writer.h
+++ b/tools/gn/ninja_binary_target_writer.h
@@ -31,6 +31,12 @@ class NinjaBinaryTargetWriter : public NinjaTargetWriter {
// Writes all flags for the compiler: includes, defines, cflags, etc.
void WriteCompilerVars(const SourceFileTypeSet& used_types);
+ // Writes to the output stream a stamp rule for inputs, and
+ // returns the file to be appended to source rules that encodes the
+ // implicit dependencies for the current target. The returned OutputFile
+ // will be empty if there are no inputs.
+ OutputFile WriteInputsStampAndGetDep() const;
+
// has_precompiled_headers is set when this substitution matches a tool type
// that supports precompiled headers, and this target supports precompiled
// headers. It doesn't indicate if the tool has precompiled headers (this
@@ -55,6 +61,7 @@ class NinjaBinaryTargetWriter : public NinjaTargetWriter {
// compiling this target. It will be empty if there are no input deps.
void WritePCHCommands(const SourceFileTypeSet& used_types,
const OutputFile& input_dep,
+ const OutputFile& order_only_dep,
std::vector<OutputFile>* object_files,
std::vector<OutputFile>* other_files);
@@ -63,16 +70,19 @@ class NinjaBinaryTargetWriter : public NinjaTargetWriter {
Toolchain::ToolType tool_type,
Tool::PrecompiledHeaderType header_type,
const OutputFile& input_dep,
+ const OutputFile& order_only_dep,
std::vector<OutputFile>* object_files,
std::vector<OutputFile>* other_files);
void WriteGCCPCHCommand(SubstitutionType flag_type,
Toolchain::ToolType tool_type,
+ const OutputFile& input_dep,
const OutputFile& order_only_dep,
std::vector<OutputFile>* gch_files);
void WriteWindowsPCHCommand(SubstitutionType flag_type,
Toolchain::ToolType tool_type,
+ const OutputFile& input_dep,
const OutputFile& order_only_dep,
std::vector<OutputFile>* object_files);
@@ -84,6 +94,7 @@ class NinjaBinaryTargetWriter : public NinjaTargetWriter {
//
// The files produced by the compiler will be added to two output vectors.
void WriteSources(const std::vector<OutputFile>& pch_deps,
+ const OutputFile& input_dep,
const OutputFile& order_only_dep,
std::vector<OutputFile>* object_files,
std::vector<SourceFile>* other_files);
« no previous file with comments | « tools/gn/docs/reference.md ('k') | tools/gn/ninja_binary_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698