| 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 #ifndef TOOLS_GN_TOOLCHAIN_H_ | 5 #ifndef TOOLS_GN_TOOLCHAIN_H_ |
| 6 #define TOOLS_GN_TOOLCHAIN_H_ | 6 #define TOOLS_GN_TOOLCHAIN_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/strings/string_piece.h" | 9 #include "base/strings/string_piece.h" |
| 10 #include "tools/gn/item.h" | 10 #include "tools/gn/item.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 public: | 25 public: |
| 26 enum ToolType { | 26 enum ToolType { |
| 27 TYPE_NONE = 0, | 27 TYPE_NONE = 0, |
| 28 TYPE_CC, | 28 TYPE_CC, |
| 29 TYPE_CXX, | 29 TYPE_CXX, |
| 30 TYPE_OBJC, | 30 TYPE_OBJC, |
| 31 TYPE_OBJCXX, | 31 TYPE_OBJCXX, |
| 32 TYPE_ASM, | 32 TYPE_ASM, |
| 33 TYPE_ALINK, | 33 TYPE_ALINK, |
| 34 TYPE_SOLINK, | 34 TYPE_SOLINK, |
| 35 TYPE_SOLINK_MODULE, | |
| 36 TYPE_LINK, | 35 TYPE_LINK, |
| 37 TYPE_STAMP, | 36 TYPE_STAMP, |
| 38 TYPE_COPY, | 37 TYPE_COPY, |
| 39 | 38 |
| 40 TYPE_NUMTYPES // Must be last. | 39 TYPE_NUMTYPES // Must be last. |
| 41 }; | 40 }; |
| 42 | 41 |
| 43 static const char* kToolCc; | 42 static const char* kToolCc; |
| 44 static const char* kToolCxx; | 43 static const char* kToolCxx; |
| 45 static const char* kToolObjC; | 44 static const char* kToolObjC; |
| 46 static const char* kToolObjCxx; | 45 static const char* kToolObjCxx; |
| 47 static const char* kToolAsm; | 46 static const char* kToolAsm; |
| 48 static const char* kToolAlink; | 47 static const char* kToolAlink; |
| 49 static const char* kToolSolink; | 48 static const char* kToolSolink; |
| 50 static const char* kToolSolinkModule; | |
| 51 static const char* kToolLink; | 49 static const char* kToolLink; |
| 52 static const char* kToolStamp; | 50 static const char* kToolStamp; |
| 53 static const char* kToolCopy; | 51 static const char* kToolCopy; |
| 54 | 52 |
| 55 struct Tool { | 53 struct Tool { |
| 56 Tool(); | 54 Tool(); |
| 57 ~Tool(); | 55 ~Tool(); |
| 58 | 56 |
| 59 bool empty() const { | 57 bool empty() const { |
| 60 return command.empty() && depfile.empty() && deps.empty() && | 58 return command.empty() && depfile.empty() && deps.empty() && |
| (...skipping 28 matching lines...) Expand all Loading... |
| 89 const std::string& environment() const { return environment_; } | 87 const std::string& environment() const { return environment_; } |
| 90 void set_environment(const std::string& env) { environment_ = env; } | 88 void set_environment(const std::string& env) { environment_ = env; } |
| 91 | 89 |
| 92 private: | 90 private: |
| 93 Tool tools_[TYPE_NUMTYPES]; | 91 Tool tools_[TYPE_NUMTYPES]; |
| 94 | 92 |
| 95 std::string environment_; | 93 std::string environment_; |
| 96 }; | 94 }; |
| 97 | 95 |
| 98 #endif // TOOLS_GN_TOOLCHAIN_H_ | 96 #endif // TOOLS_GN_TOOLCHAIN_H_ |
| OLD | NEW |