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 "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 Indent(indent + kExtraIndent) << "'VALID_ARCHS': 'armv7 i386',\n"; | 476 Indent(indent + kExtraIndent) << "'VALID_ARCHS': 'armv7 i386',\n"; |
477 | 477 |
478 // Tell XCode to target both iPhone and iPad. GN has no such concept. | 478 // Tell XCode to target both iPhone and iPad. GN has no such concept. |
479 Indent(indent + kExtraIndent) << "'TARGETED_DEVICE_FAMILY': '1,2',\n"; | 479 Indent(indent + kExtraIndent) << "'TARGETED_DEVICE_FAMILY': '1,2',\n"; |
480 | 480 |
481 if (IsIOSSimulator(flags.cflags)) { | 481 if (IsIOSSimulator(flags.cflags)) { |
482 Indent(indent + kExtraIndent) << "'SDKROOT': 'iphonesimulator',\n"; | 482 Indent(indent + kExtraIndent) << "'SDKROOT': 'iphonesimulator',\n"; |
483 } else { | 483 } else { |
484 Indent(indent + kExtraIndent) << "'SDKROOT': 'iphoneos',\n"; | 484 Indent(indent + kExtraIndent) << "'SDKROOT': 'iphoneos',\n"; |
485 std::string min_ver = GetIPhoneVersionMin(&flags.cflags); | 485 std::string min_ver = GetIPhoneVersionMin(&flags.cflags); |
486 if (!min_ver.empty()) | 486 if (!min_ver.empty()) { |
487 Indent(indent + kExtraIndent) << "'IPHONEOS_DEPLOYMENT_TARGET': '',\n"; | 487 Indent(indent + kExtraIndent) << "'IPHONEOS_DEPLOYMENT_TARGET': '" |
| 488 << min_ver << "',\n"; |
| 489 } |
488 } | 490 } |
489 } else { | 491 } else { |
490 // When doing regular Mac and "host" iOS (which look like regular Mac) | 492 // When doing regular Mac and "host" iOS (which look like regular Mac) |
491 // builds, we can set the ARCHS value to what's specified in the build. | 493 // builds, we can set the ARCHS value to what's specified in the build. |
492 if (arch == "i386") | 494 if (arch == "i386") |
493 Indent(indent + kExtraIndent) << "'ARCHS': [ 'i386' ],\n"; | 495 Indent(indent + kExtraIndent) << "'ARCHS': [ 'i386' ],\n"; |
494 else if (arch == "x86_64") | 496 else if (arch == "x86_64") |
495 Indent(indent + kExtraIndent) << "'ARCHS': [ 'x86_64' ],\n"; | 497 Indent(indent + kExtraIndent) << "'ARCHS': [ 'x86_64' ],\n"; |
496 } | 498 } |
497 | 499 |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 return; | 760 return; |
759 | 761 |
760 EscapeOptions options; | 762 EscapeOptions options; |
761 options.mode = ESCAPE_JSON; | 763 options.mode = ESCAPE_JSON; |
762 | 764 |
763 Indent(indent) << "'" << name << "': ["; | 765 Indent(indent) << "'" << name << "': ["; |
764 WriteArrayValues(out_, values); | 766 WriteArrayValues(out_, values); |
765 out_ << " ],\n"; | 767 out_ << " ],\n"; |
766 } | 768 } |
767 | 769 |
OLD | NEW |