| 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_target_writer.h" | 5 #include "tools/gn/gyp_target_writer.h" |
| 6 | 6 |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "tools/gn/build_settings.h" | 11 #include "tools/gn/build_settings.h" |
| 12 #include "tools/gn/builder_record.h" | 12 #include "tools/gn/builder_record.h" |
| 13 #include "tools/gn/filesystem_utils.h" | 13 #include "tools/gn/filesystem_utils.h" |
| 14 #include "tools/gn/gyp_binary_target_writer.h" | 14 #include "tools/gn/gyp_binary_target_writer.h" |
| 15 #include "tools/gn/gyp_script_target_writer.h" | 15 #include "tools/gn/gyp_script_target_writer.h" |
| 16 #include "tools/gn/scheduler.h" | 16 #include "tools/gn/scheduler.h" |
| 17 #include "tools/gn/settings.h" | 17 #include "tools/gn/settings.h" |
| 18 #include "tools/gn/target.h" | 18 #include "tools/gn/target.h" |
| 19 #include "tools/gn/toolchain.h" | 19 #include "tools/gn/toolchain.h" |
| 20 | 20 |
| 21 GypTargetWriter::TargetGroup::TargetGroup() |
| 22 : debug(NULL), |
| 23 release(NULL), |
| 24 host_debug(NULL), |
| 25 host_release(NULL), |
| 26 debug64(NULL), |
| 27 release64(NULL), |
| 28 xcode_debug(NULL), |
| 29 xcode_release(NULL), |
| 30 xcode_host_debug(NULL), |
| 31 xcode_host_release(NULL) { |
| 32 } |
| 33 |
| 21 GypTargetWriter::GypTargetWriter(const Target* target, | 34 GypTargetWriter::GypTargetWriter(const Target* target, |
| 22 const Toolchain* toolchain, | 35 const Toolchain* toolchain, |
| 23 const SourceDir& gyp_dir, | 36 const SourceDir& gyp_dir, |
| 24 std::ostream& out) | 37 std::ostream& out) |
| 25 : settings_(target->settings()), | 38 : settings_(target->settings()), |
| 26 target_(target), | 39 target_(target), |
| 27 toolchain_(toolchain), | 40 toolchain_(toolchain), |
| 28 gyp_dir_(gyp_dir), | 41 gyp_dir_(gyp_dir), |
| 29 out_(out), | 42 out_(out), |
| 30 // All GYP paths are relative to GYP file. | 43 // All GYP paths are relative to GYP file. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 112 |
| 100 // static | 113 // static |
| 101 std::ostream& GypTargetWriter::Indent(std::ostream& out, int spaces) { | 114 std::ostream& GypTargetWriter::Indent(std::ostream& out, int spaces) { |
| 102 const char kSpaces[81] = | 115 const char kSpaces[81] = |
| 103 " " | 116 " " |
| 104 " "; | 117 " "; |
| 105 CHECK(static_cast<size_t>(spaces) <= arraysize(kSpaces) - 1); | 118 CHECK(static_cast<size_t>(spaces) <= arraysize(kSpaces) - 1); |
| 106 out.write(kSpaces, spaces); | 119 out.write(kSpaces, spaces); |
| 107 return out; | 120 return out; |
| 108 } | 121 } |
| OLD | NEW |