| OLD | NEW |
| 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/gyp_binary_target_writer.h" | 5 #include "tools/gn/gyp_binary_target_writer.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "tools/gn/builder_record.h" | 10 #include "tools/gn/builder_record.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 if (target_->hard_dep()) | 157 if (target_->hard_dep()) |
| 158 Indent(indent) << "'hard_dependency': 1,\n"; | 158 Indent(indent) << "'hard_dependency': 1,\n"; |
| 159 } | 159 } |
| 160 | 160 |
| 161 void GypBinaryTargetWriter::WriteVCConfiguration(int indent) { | 161 void GypBinaryTargetWriter::WriteVCConfiguration(int indent) { |
| 162 Indent(indent) << "'configurations': {\n"; | 162 Indent(indent) << "'configurations': {\n"; |
| 163 | 163 |
| 164 Indent(indent + kExtraIndent) << "'Debug': {\n"; | 164 Indent(indent + kExtraIndent) << "'Debug': {\n"; |
| 165 Indent(indent + kExtraIndent * 2) << |
| 166 "'msvs_configuration_platform': 'Win32',\n"; |
| 165 Flags debug_flags(FlagsFromTarget(group_.debug->item()->AsTarget())); | 167 Flags debug_flags(FlagsFromTarget(group_.debug->item()->AsTarget())); |
| 166 WriteVCFlags(debug_flags, indent + kExtraIndent * 2); | 168 WriteVCFlags(debug_flags, indent + kExtraIndent * 2); |
| 167 Indent(indent + kExtraIndent) << "},\n"; | 169 Indent(indent + kExtraIndent) << "},\n"; |
| 168 | 170 |
| 169 Indent(indent + kExtraIndent) << "'Release': {\n"; | 171 Indent(indent + kExtraIndent) << "'Release': {\n"; |
| 172 Indent(indent + kExtraIndent * 2) << |
| 173 "'msvs_configuration_platform': 'Win32',\n"; |
| 170 Flags release_flags(FlagsFromTarget(group_.release->item()->AsTarget())); | 174 Flags release_flags(FlagsFromTarget(group_.release->item()->AsTarget())); |
| 171 WriteVCFlags(release_flags, indent + kExtraIndent * 2); | 175 WriteVCFlags(release_flags, indent + kExtraIndent * 2); |
| 172 Indent(indent + kExtraIndent) << "},\n"; | 176 Indent(indent + kExtraIndent) << "},\n"; |
| 173 | 177 |
| 174 // Note that we always need Debug_x64 and Release_x64 defined or GYP will get | 178 // Note that we always need Debug_x64 and Release_x64 defined or GYP will get |
| 175 // confused, but we ca leave them empty if there's no 64-bit target. | 179 // confused, but we ca leave them empty if there's no 64-bit target. |
| 176 Indent(indent + kExtraIndent) << "'Debug_x64': {\n"; | 180 Indent(indent + kExtraIndent) << "'Debug_x64': {\n"; |
| 177 if (group_.debug64) { | 181 if (group_.debug64) { |
| 182 Indent(indent + kExtraIndent * 2) << |
| 183 "'msvs_configuration_platform': 'x64',\n"; |
| 178 Flags flags(FlagsFromTarget(group_.debug64->item()->AsTarget())); | 184 Flags flags(FlagsFromTarget(group_.debug64->item()->AsTarget())); |
| 179 WriteVCFlags(flags, indent + kExtraIndent * 2); | 185 WriteVCFlags(flags, indent + kExtraIndent * 2); |
| 180 } | 186 } |
| 181 Indent(indent + kExtraIndent) << "},\n"; | 187 Indent(indent + kExtraIndent) << "},\n"; |
| 182 | 188 |
| 183 Indent(indent + kExtraIndent) << "'Release_x64': {\n"; | 189 Indent(indent + kExtraIndent) << "'Release_x64': {\n"; |
| 184 if (group_.release64) { | 190 if (group_.release64) { |
| 191 Indent(indent + kExtraIndent * 2) << |
| 192 "'msvs_configuration_platform': 'x64',\n"; |
| 185 Flags flags(FlagsFromTarget(group_.release64->item()->AsTarget())); | 193 Flags flags(FlagsFromTarget(group_.release64->item()->AsTarget())); |
| 186 WriteVCFlags(flags, indent + kExtraIndent * 2); | 194 WriteVCFlags(flags, indent + kExtraIndent * 2); |
| 187 } | 195 } |
| 188 Indent(indent + kExtraIndent) << "},\n"; | 196 Indent(indent + kExtraIndent) << "},\n"; |
| 189 | 197 |
| 190 Indent(indent) << "},\n"; | 198 Indent(indent) << "},\n"; |
| 191 | 199 |
| 192 WriteSources(target_, indent); | 200 WriteSources(target_, indent); |
| 193 WriteDeps(target_, indent); | 201 WriteDeps(target_, indent); |
| 194 } | 202 } |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 return; | 581 return; |
| 574 | 582 |
| 575 EscapeOptions options; | 583 EscapeOptions options; |
| 576 options.mode = ESCAPE_JSON; | 584 options.mode = ESCAPE_JSON; |
| 577 | 585 |
| 578 Indent(indent) << "'" << name << "': ["; | 586 Indent(indent) << "'" << name << "': ["; |
| 579 WriteArrayValues(out_, values); | 587 WriteArrayValues(out_, values); |
| 580 out_ << " ],\n"; | 588 out_ << " ],\n"; |
| 581 } | 589 } |
| 582 | 590 |
| OLD | NEW |