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

Unified Diff: tools/gn/ninja_writer.cc

Issue 508763002: Hook up link pools in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: default to 0 Created 6 years, 4 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_toolchain_writer.cc ('k') | tools/gn/tool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_writer.cc
diff --git a/tools/gn/ninja_writer.cc b/tools/gn/ninja_writer.cc
index e4c0a22a748ddb7d0a78236565b394d0d7962e74..f99336bdba8ad0a3698b428162965b14c6072907 100644
--- a/tools/gn/ninja_writer.cc
+++ b/tools/gn/ninja_writer.cc
@@ -9,6 +9,7 @@
#include "tools/gn/location.h"
#include "tools/gn/ninja_build_writer.h"
#include "tools/gn/ninja_toolchain_writer.h"
+#include "tools/gn/settings.h"
NinjaWriter::NinjaWriter(const BuildSettings* build_settings,
Builder* builder)
@@ -88,9 +89,15 @@ bool NinjaWriter::WriteToolchains(std::vector<const Settings*>* all_settings,
bool NinjaWriter::WriteRootBuildfiles(
const std::vector<const Settings*>& all_settings,
const std::vector<const Target*>& default_targets) {
+ // All Settings objects should have the same default toolchain, and there
+ // should always be at least one settings object in the build.
+ CHECK(!all_settings.empty());
+ const Toolchain* default_toolchain =
+ builder_->GetToolchain(all_settings[0]->default_toolchain_label());
+
// Write the root buildfile.
if (!NinjaBuildWriter::RunAndWriteFile(build_settings_, all_settings,
- default_targets)) {
+ default_toolchain, default_targets)) {
Err(Location(),
"Couldn't open toolchain buildfile(s) for writing").PrintToStdout();
return false;
« no previous file with comments | « tools/gn/ninja_toolchain_writer.cc ('k') | tools/gn/tool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698