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

Unified Diff: tools/gn/ninja_writer.h

Issue 455193003: GN: Generate error if multiple rules generate same file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/ninja_build_writer.cc ('k') | tools/gn/ninja_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_writer.h
diff --git a/tools/gn/ninja_writer.h b/tools/gn/ninja_writer.h
index 8859f1ad65ec4e7e2c434d097108f87f5283e587..bde836ce2825bebd80e9fe59a1452b4753bf7f81 100644
--- a/tools/gn/ninja_writer.h
+++ b/tools/gn/ninja_writer.h
@@ -13,21 +13,24 @@
class Builder;
class BuildSettings;
+class Err;
class Settings;
class Target;
class NinjaWriter {
public:
- // On failure will print an error and will return false.
+ // On failure will populate |err| and will return false.
static bool RunAndWriteFiles(const BuildSettings* build_settings,
- Builder* builder);
+ Builder* builder,
+ Err* err);
// Writes only the toolchain.ninja files, skipping the root buildfile. The
// settings for the files written will be added to the vector.
static bool RunAndWriteToolchainFiles(
const BuildSettings* build_settings,
Builder* builder,
- std::vector<const Settings*>* all_settings);
+ std::vector<const Settings*>* all_settings,
+ Err* err);
private:
NinjaWriter(const BuildSettings* build_settings, Builder* builder);
@@ -35,9 +38,11 @@ class NinjaWriter {
bool WriteToolchains(
std::vector<const Settings*>* all_settings,
- std::vector<const Target*>* default_targets);
+ std::vector<const Target*>* default_targets,
+ Err* err);
bool WriteRootBuildfiles(const std::vector<const Settings*>& all_settings,
- const std::vector<const Target*>& default_targets);
+ const std::vector<const Target*>& default_targets,
+ Err* err);
const BuildSettings* build_settings_;
Builder* builder_;
« no previous file with comments | « tools/gn/ninja_build_writer.cc ('k') | tools/gn/ninja_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698