Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: tools/gn/toolchain.cc

Issue 1160773002: Add support for module-definition files to gn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove conditional compilation and add tests Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/source_file_type.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/toolchain.h" 5 #include "tools/gn/toolchain.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "tools/gn/target.h" 10 #include "tools/gn/target.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 case SOURCE_MM: 109 case SOURCE_MM:
110 return TYPE_OBJCXX; 110 return TYPE_OBJCXX;
111 case SOURCE_ASM: 111 case SOURCE_ASM:
112 case SOURCE_S: 112 case SOURCE_S:
113 return TYPE_ASM; 113 return TYPE_ASM;
114 case SOURCE_RC: 114 case SOURCE_RC:
115 return TYPE_RC; 115 return TYPE_RC;
116 case SOURCE_UNKNOWN: 116 case SOURCE_UNKNOWN:
117 case SOURCE_H: 117 case SOURCE_H:
118 case SOURCE_O: 118 case SOURCE_O:
119 case SOURCE_DEF:
119 return TYPE_NONE; 120 return TYPE_NONE;
120 default: 121 default:
121 NOTREACHED(); 122 NOTREACHED();
122 return TYPE_NONE; 123 return TYPE_NONE;
123 } 124 }
124 } 125 }
125 126
126 const Tool* Toolchain::GetToolForSourceType(SourceFileType type) { 127 const Tool* Toolchain::GetToolForSourceType(SourceFileType type) {
127 return tools_[GetToolTypeForSourceType(type)].get(); 128 return tools_[GetToolTypeForSourceType(type)].get();
128 } 129 }
(...skipping 20 matching lines...) Expand all
149 return TYPE_STAMP; 150 return TYPE_STAMP;
150 default: 151 default:
151 NOTREACHED(); 152 NOTREACHED();
152 return Toolchain::TYPE_NONE; 153 return Toolchain::TYPE_NONE;
153 } 154 }
154 } 155 }
155 156
156 const Tool* Toolchain::GetToolForTargetFinalOutput(const Target* target) const { 157 const Tool* Toolchain::GetToolForTargetFinalOutput(const Target* target) const {
157 return tools_[GetToolTypeForTargetFinalOutput(target)].get(); 158 return tools_[GetToolTypeForTargetFinalOutput(target)].get();
158 } 159 }
OLDNEW
« no previous file with comments | « tools/gn/source_file_type.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698