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

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

Issue 236713002: Implement net in GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/tools/tld_cleanup/BUILD.gn ('k') | tools/gn/secondary/tools/grit/grit_rule.gni » ('j') | 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/ninja_helper.h" 5 #include "tools/gn/ninja_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "tools/gn/filesystem_utils.h" 8 #include "tools/gn/filesystem_utils.h"
9 #include "tools/gn/string_utils.h" 9 #include "tools/gn/string_utils.h"
10 #include "tools/gn/target.h" 10 #include "tools/gn/target.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 SourceFileType type) const { 205 SourceFileType type) const {
206 // This function may be hot since it will be called for every source file 206 // This function may be hot since it will be called for every source file
207 // in the tree. We could cache the results to avoid making a string for 207 // in the tree. We could cache the results to avoid making a string for
208 // every invocation. 208 // every invocation.
209 std::string prefix = GetRulePrefix(settings); 209 std::string prefix = GetRulePrefix(settings);
210 210
211 if (type == SOURCE_C) 211 if (type == SOURCE_C)
212 return prefix + "cc"; 212 return prefix + "cc";
213 if (type == SOURCE_CC) 213 if (type == SOURCE_CC)
214 return prefix + "cxx"; 214 return prefix + "cxx";
215 if (type == SOURCE_M)
216 return prefix + "objc";
217 if (type == SOURCE_MM)
218 return prefix + "objcxx";
219 if (type == SOURCE_RC)
220 return prefix + "rc";
221 if (type == SOURCE_S)
222 return prefix + "cc"; // Assembly files just get compiled by CC.
215 223
216 // TODO(brettw) asm files. 224 // TODO(brettw) asm files.
217 225
218 if (settings->IsMac()) {
219 if (type == SOURCE_M)
220 return prefix + "objc";
221 if (type == SOURCE_MM)
222 return prefix + "objcxx";
223 }
224
225 if (settings->IsWin()) {
226 if (type == SOURCE_RC)
227 return prefix + "rc";
228 } else {
229 if (type == SOURCE_S)
230 return prefix + "cc"; // Assembly files just get compiled by CC.
231 }
232
233 return std::string(); 226 return std::string();
234 } 227 }
OLDNEW
« no previous file with comments | « net/tools/tld_cleanup/BUILD.gn ('k') | tools/gn/secondary/tools/grit/grit_rule.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698