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

Side by Side Diff: tools/gn/value_extractors.h

Issue 1530183005: Special-case paths that appear in libs by not prefixing them with -l. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo in previous patch Created 4 years, 12 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/test_with_scope.cc ('k') | tools/gn/value_extractors.cc » ('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 #ifndef TOOLS_GN_VALUE_EXTRACTORS_H_ 5 #ifndef TOOLS_GN_VALUE_EXTRACTORS_H_
6 #define TOOLS_GN_VALUE_EXTRACTORS_H_ 6 #define TOOLS_GN_VALUE_EXTRACTORS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "tools/gn/label_ptr.h" 11 #include "tools/gn/label_ptr.h"
12 #include "tools/gn/lib_file.h"
12 #include "tools/gn/unique_vector.h" 13 #include "tools/gn/unique_vector.h"
13 14
14 class BuildSettings; 15 class BuildSettings;
15 class Err; 16 class Err;
16 class Label; 17 class Label;
17 class SourceDir; 18 class SourceDir;
18 class SourceFile; 19 class SourceFile;
19 class Value; 20 class Value;
20 21
21 // On failure, returns false and sets the error. 22 // On failure, returns false and sets the error.
22 bool ExtractListOfStringValues(const Value& value, 23 bool ExtractListOfStringValues(const Value& value,
23 std::vector<std::string>* dest, 24 std::vector<std::string>* dest,
24 Err* err); 25 Err* err);
25 26
26 // Looks for a list of source files relative to a given current dir. 27 // Looks for a list of source files relative to a given current dir.
27 bool ExtractListOfRelativeFiles(const BuildSettings* build_settings, 28 bool ExtractListOfRelativeFiles(const BuildSettings* build_settings,
28 const Value& value, 29 const Value& value,
29 const SourceDir& current_dir, 30 const SourceDir& current_dir,
30 std::vector<SourceFile>* files, 31 std::vector<SourceFile>* files,
31 Err* err); 32 Err* err);
32 33
34 // Extracts a list of libraries. When they contain a "/" they are treated as
35 // source paths and are otherwise treated as plain strings.
36 bool ExtractListOfLibs(const BuildSettings* build_settings,
37 const Value& value,
38 const SourceDir& current_dir,
39 std::vector<LibFile>* libs,
40 Err* err);
41
33 // Looks for a list of source directories relative to a given current dir. 42 // Looks for a list of source directories relative to a given current dir.
34 bool ExtractListOfRelativeDirs(const BuildSettings* build_settings, 43 bool ExtractListOfRelativeDirs(const BuildSettings* build_settings,
35 const Value& value, 44 const Value& value,
36 const SourceDir& current_dir, 45 const SourceDir& current_dir,
37 std::vector<SourceDir>* dest, 46 std::vector<SourceDir>* dest,
38 Err* err); 47 Err* err);
39 48
40 // Extracts the list of labels and their origins to the given vector. Only the 49 // Extracts the list of labels and their origins to the given vector. Only the
41 // labels are filled in, the ptr for each pair in the vector will be null. 50 // labels are filled in, the ptr for each pair in the vector will be null.
42 bool ExtractListOfLabels(const Value& value, 51 bool ExtractListOfLabels(const Value& value,
(...skipping 22 matching lines...) Expand all
65 UniqueVector<LabelTargetPair>* dest, 74 UniqueVector<LabelTargetPair>* dest,
66 Err* err); 75 Err* err);
67 76
68 bool ExtractRelativeFile(const BuildSettings* build_settings, 77 bool ExtractRelativeFile(const BuildSettings* build_settings,
69 const Value& value, 78 const Value& value,
70 const SourceDir& current_dir, 79 const SourceDir& current_dir,
71 SourceFile* file, 80 SourceFile* file,
72 Err* err); 81 Err* err);
73 82
74 #endif // TOOLS_GN_VALUE_EXTRACTORS_H_ 83 #endif // TOOLS_GN_VALUE_EXTRACTORS_H_
OLDNEW
« no previous file with comments | « tools/gn/test_with_scope.cc ('k') | tools/gn/value_extractors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698