| 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:
|
|
|