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

Side by Side Diff: tools/gn/loader.cc

Issue 115643002: Hook up GN official build and branding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« build/config/linux/sysroot.gni ('K') | « build/gyp_chromium ('k') | no next file » | 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 #include "tools/gn/loader.h" 5 #include "tools/gn/loader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "tools/gn/build_settings.h" 10 #include "tools/gn/build_settings.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 ScopedTrace trace(TraceItem::TRACE_FILE_EXECUTE, 286 ScopedTrace trace(TraceItem::TRACE_FILE_EXECUTE,
287 settings->build_settings()->build_config_file().value()); 287 settings->build_settings()->build_config_file().value());
288 trace.SetToolchain(settings->toolchain_label()); 288 trace.SetToolchain(settings->toolchain_label());
289 289
290 const BlockNode* root_block = root->AsBlock(); 290 const BlockNode* root_block = root->AsBlock();
291 Err err; 291 Err err;
292 root_block->ExecuteBlockInScope(base_config, &err); 292 root_block->ExecuteBlockInScope(base_config, &err);
293 293
294 trace.Done(); 294 trace.Done();
295 295
296 if (err.has_error())
297 g_scheduler->FailWithError(err);
298
296 base_config->ClearProcessingBuildConfig(); 299 base_config->ClearProcessingBuildConfig();
297 if (settings->is_default()) { 300 if (settings->is_default()) {
298 // The default toolchain must have been set in the default build config 301 // The default toolchain must have been set in the default build config
299 // file. 302 // file.
300 if (default_toolchain_label.is_null()) { 303 if (default_toolchain_label.is_null()) {
301 g_scheduler->FailWithError(Err(Location(), 304 g_scheduler->FailWithError(Err(Location(),
302 "The default build config file did not call set_default_toolchain()", 305 "The default build config file did not call set_default_toolchain()",
303 "If you don't call this, I can't figure out what toolchain to use\n" 306 "If you don't call this, I can't figure out what toolchain to use\n"
304 "for all of this code.")); 307 "for all of this code."));
305 } else { 308 } else {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 const SourceFile& file_name, 392 const SourceFile& file_name,
390 const base::Callback<void(const ParseNode*)>& callback, 393 const base::Callback<void(const ParseNode*)>& callback,
391 Err* err) { 394 Err* err) {
392 if (async_load_file_.is_null()) { 395 if (async_load_file_.is_null()) {
393 return g_scheduler->input_file_manager()->AsyncLoadFile( 396 return g_scheduler->input_file_manager()->AsyncLoadFile(
394 origin, build_settings, file_name, callback, err); 397 origin, build_settings, file_name, callback, err);
395 } 398 }
396 return async_load_file_.Run( 399 return async_load_file_.Run(
397 origin, build_settings, file_name, callback, err); 400 origin, build_settings, file_name, callback, err);
398 } 401 }
OLDNEW
« build/config/linux/sysroot.gni ('K') | « build/gyp_chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698