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

Side by Side Diff: tools/gn/config_values.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 5 years 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/command_desc.cc ('k') | tools/gn/config_values_generator.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_CONFIG_VALUES_H_ 5 #ifndef TOOLS_GN_CONFIG_VALUES_H_
6 #define TOOLS_GN_CONFIG_VALUES_H_ 6 #define TOOLS_GN_CONFIG_VALUES_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "tools/gn/lib_file.h"
12 #include "tools/gn/source_dir.h" 13 #include "tools/gn/source_dir.h"
13 #include "tools/gn/source_file.h" 14 #include "tools/gn/source_file.h"
14 15
15 // Holds the values (include_dirs, defines, compiler flags, etc.) for a given 16 // Holds the values (include_dirs, defines, compiler flags, etc.) for a given
16 // config or target. 17 // config or target.
17 class ConfigValues { 18 class ConfigValues {
18 public: 19 public:
19 ConfigValues(); 20 ConfigValues();
20 ~ConfigValues(); 21 ~ConfigValues();
21 22
(...skipping 10 matching lines...) Expand all
32 STRING_VALUES_ACCESSOR(asmflags) 33 STRING_VALUES_ACCESSOR(asmflags)
33 STRING_VALUES_ACCESSOR(cflags) 34 STRING_VALUES_ACCESSOR(cflags)
34 STRING_VALUES_ACCESSOR(cflags_c) 35 STRING_VALUES_ACCESSOR(cflags_c)
35 STRING_VALUES_ACCESSOR(cflags_cc) 36 STRING_VALUES_ACCESSOR(cflags_cc)
36 STRING_VALUES_ACCESSOR(cflags_objc) 37 STRING_VALUES_ACCESSOR(cflags_objc)
37 STRING_VALUES_ACCESSOR(cflags_objcc) 38 STRING_VALUES_ACCESSOR(cflags_objcc)
38 STRING_VALUES_ACCESSOR(defines) 39 STRING_VALUES_ACCESSOR(defines)
39 DIR_VALUES_ACCESSOR (include_dirs) 40 DIR_VALUES_ACCESSOR (include_dirs)
40 STRING_VALUES_ACCESSOR(ldflags) 41 STRING_VALUES_ACCESSOR(ldflags)
41 DIR_VALUES_ACCESSOR (lib_dirs) 42 DIR_VALUES_ACCESSOR (lib_dirs)
42 STRING_VALUES_ACCESSOR(libs)
43 // If you add a new one, be sure to update AppendValues(). 43 // If you add a new one, be sure to update AppendValues().
44 44
45 #undef STRING_VALUES_ACCESSOR 45 #undef STRING_VALUES_ACCESSOR
46 #undef DIR_VALUES_ACCESSOR 46 #undef DIR_VALUES_ACCESSOR
47 47
48 const std::vector<LibFile>& libs() const { return libs_; }
49 std::vector<LibFile>& libs() { return libs_; }
50
48 bool has_precompiled_headers() const { 51 bool has_precompiled_headers() const {
49 return !precompiled_header_.empty() || !precompiled_source_.is_null(); 52 return !precompiled_header_.empty() || !precompiled_source_.is_null();
50 } 53 }
51 const std::string& precompiled_header() const { 54 const std::string& precompiled_header() const {
52 return precompiled_header_; 55 return precompiled_header_;
53 } 56 }
54 void set_precompiled_header(const std::string& f) { 57 void set_precompiled_header(const std::string& f) {
55 precompiled_header_ = f; 58 precompiled_header_ = f;
56 } 59 }
57 const SourceFile& precompiled_source() const { 60 const SourceFile& precompiled_source() const {
58 return precompiled_source_; 61 return precompiled_source_;
59 } 62 }
60 void set_precompiled_source(const SourceFile& f) { 63 void set_precompiled_source(const SourceFile& f) {
61 precompiled_source_ = f; 64 precompiled_source_ = f;
62 } 65 }
63 66
64 private: 67 private:
65 std::vector<std::string> asmflags_; 68 std::vector<std::string> asmflags_;
66 std::vector<std::string> cflags_; 69 std::vector<std::string> cflags_;
67 std::vector<std::string> cflags_c_; 70 std::vector<std::string> cflags_c_;
68 std::vector<std::string> cflags_cc_; 71 std::vector<std::string> cflags_cc_;
69 std::vector<std::string> cflags_objc_; 72 std::vector<std::string> cflags_objc_;
70 std::vector<std::string> cflags_objcc_; 73 std::vector<std::string> cflags_objcc_;
71 std::vector<std::string> defines_; 74 std::vector<std::string> defines_;
72 std::vector<SourceDir> include_dirs_; 75 std::vector<SourceDir> include_dirs_;
73 std::vector<std::string> ldflags_; 76 std::vector<std::string> ldflags_;
74 std::vector<SourceDir> lib_dirs_; 77 std::vector<SourceDir> lib_dirs_;
75 std::vector<std::string> libs_; 78 std::vector<LibFile> libs_;
76 // If you add a new one, be sure to update AppendValues(). 79 // If you add a new one, be sure to update AppendValues().
77 80
78 std::string precompiled_header_; 81 std::string precompiled_header_;
79 SourceFile precompiled_source_; 82 SourceFile precompiled_source_;
80 }; 83 };
81 84
82 #endif // TOOLS_GN_CONFIG_VALUES_H_ 85 #endif // TOOLS_GN_CONFIG_VALUES_H_
OLDNEW
« no previous file with comments | « tools/gn/command_desc.cc ('k') | tools/gn/config_values_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698