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

Unified Diff: tools/gn/ninja_binary_target_writer.h

Issue 1292983004: [GN]: Precompiled header support for GCC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/function_toolchain.cc ('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 5888ac59bbac22c0ddda4788c2f12ca0adebc1e3..db2b15d12afb8a610677f0fc1282fdc4d656869b 100644
--- a/tools/gn/ninja_binary_target_writer.h
+++ b/tools/gn/ninja_binary_target_writer.h
@@ -47,27 +47,43 @@ class NinjaBinaryTargetWriter : public NinjaTargetWriter {
EscapeOptions flag_escape_options);
// Writes build lines required for precompiled headers. Any generated
- // object files will be appended to the given vector.
+ // object files will be appended to the |object_files|. Any generated
+ // non-object files (for instance, .gch files from a GCC toolchain, are
+ // appended to |other_files|).
//
// input_dep is the stamp file collecting the dependencies required before
// compiling this target. It will be empty if there are no input deps.
- void WritePrecompiledHeaderCommands(const SourceFileTypeSet& used_types,
- const OutputFile& input_dep,
- std::vector<OutputFile>* object_files);
+ void WritePCHCommands(const SourceFileTypeSet& used_types,
+ const OutputFile& input_dep,
+ std::vector<OutputFile>* object_files,
+ std::vector<OutputFile>* other_files);
+
+ // Writes a .pch compile build line for a language type.
+ void WritePCHCommand(SubstitutionType flag_type,
+ Toolchain::ToolType tool_type,
+ Tool::PrecompiledHeaderType header_type,
+ const OutputFile& input_dep,
+ std::vector<OutputFile>* object_files,
+ std::vector<OutputFile>* other_files);
+
+ void WriteGCCPCHCommand(SubstitutionType flag_type,
+ Toolchain::ToolType tool_type,
+ const OutputFile& order_only_dep,
+ std::vector<OutputFile>* gch_files);
- // Writes a Windows .pch compile build line for a language type.
void WriteWindowsPCHCommand(SubstitutionType flag_type,
Toolchain::ToolType tool_type,
- const OutputFile& input_dep,
+ const OutputFile& order_only_dep,
std::vector<OutputFile>* object_files);
- // extra_deps are additional dependencies to run before the rule.
+ // pch_deps are additional dependencies to run before the rule. They are
+ // expected to abide by the naming conventions specified by GetPCHOutputFiles.
//
- // iorder_only_dep is the name of the stamp file that covers the dependencies
+ // order_only_dep is the name of the stamp file that covers the dependencies
// that must be run before doing any compiles.
//
// The files produced by the compiler will be added to two output vectors.
- void WriteSources(const std::vector<OutputFile>& extra_deps,
+ void WriteSources(const std::vector<OutputFile>& pch_deps,
const OutputFile& order_only_dep,
std::vector<OutputFile>* object_files,
std::vector<SourceFile>* other_files);
« no previous file with comments | « tools/gn/function_toolchain.cc ('k') | tools/gn/ninja_binary_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698