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

Unified Diff: tools/gn/gyp_target_writer.cc

Issue 56433003: GN threading refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/gyp_target_writer.h ('k') | tools/gn/input_file_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/gyp_target_writer.cc
diff --git a/tools/gn/gyp_target_writer.cc b/tools/gn/gyp_target_writer.cc
index 8a55bdc3dd28c55ea0ee577a8799eccfd4517fba..29cec2c47b0e144715ee125c89a61469b1031d3d 100644
--- a/tools/gn/gyp_target_writer.cc
+++ b/tools/gn/gyp_target_writer.cc
@@ -9,6 +9,7 @@
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "tools/gn/build_settings.h"
+#include "tools/gn/builder_record.h"
#include "tools/gn/filesystem_utils.h"
#include "tools/gn/gyp_binary_target_writer.h"
#include "tools/gn/scheduler.h"
@@ -30,15 +31,16 @@ void GypTargetWriter::WriteFile(const SourceFile& gyp_file,
Err* err) {
if (targets.empty())
return;
- const BuildSettings* debug_build_settings =
- targets[0].debug->settings()->build_settings();
+ const Settings* debug_settings =
+ targets[0].debug->item()->AsTarget()->settings();
+ const BuildSettings* debug_build_settings = debug_settings->build_settings();
std::stringstream file;
file << "# Generated by GN. Do not edit.\n\n";
file << "{\n";
file << " 'skip_includes': 1,\n";
- if (targets[0].debug->settings()->IsMac()) {
+ if (debug_settings->IsMac()) {
// Global settings for make/ninja. This must match common.gypi :(
file << " 'make_global_settings': [\n";
file << " ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang'],\n";
@@ -53,7 +55,8 @@ void GypTargetWriter::WriteFile(const SourceFile& gyp_file,
file << " 'targets': [\n";
for (size_t i = 0; i < targets.size(); i++) {
- switch (targets[i].debug->output_type()) {
+ const Target* cur = targets[i].debug->item()->AsTarget();
+ switch (cur->output_type()) {
case Target::COPY_FILES:
case Target::CUSTOM:
case Target::GROUP:
« no previous file with comments | « tools/gn/gyp_target_writer.h ('k') | tools/gn/input_file_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698