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

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

Issue 1919813003: Apply arflags to dependent configs in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/command_desc.cc ('k') | tools/gn/config_values.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
(...skipping 12 matching lines...) Expand all
23 // Appends the values from the given config to this one. 23 // Appends the values from the given config to this one.
24 void AppendValues(const ConfigValues& append); 24 void AppendValues(const ConfigValues& append);
25 25
26 #define STRING_VALUES_ACCESSOR(name) \ 26 #define STRING_VALUES_ACCESSOR(name) \
27 const std::vector<std::string>& name() const { return name##_; } \ 27 const std::vector<std::string>& name() const { return name##_; } \
28 std::vector<std::string>& name() { return name##_; } 28 std::vector<std::string>& name() { return name##_; }
29 #define DIR_VALUES_ACCESSOR(name) \ 29 #define DIR_VALUES_ACCESSOR(name) \
30 const std::vector<SourceDir>& name() const { return name##_; } \ 30 const std::vector<SourceDir>& name() const { return name##_; } \
31 std::vector<SourceDir>& name() { return name##_; } 31 std::vector<SourceDir>& name() { return name##_; }
32 32
33 // ==================================================================
34 // IMPORTANT: If you add a new one, be sure to update AppendValues().
35 // ==================================================================
33 STRING_VALUES_ACCESSOR(arflags) 36 STRING_VALUES_ACCESSOR(arflags)
34 STRING_VALUES_ACCESSOR(asmflags) 37 STRING_VALUES_ACCESSOR(asmflags)
35 STRING_VALUES_ACCESSOR(cflags) 38 STRING_VALUES_ACCESSOR(cflags)
36 STRING_VALUES_ACCESSOR(cflags_c) 39 STRING_VALUES_ACCESSOR(cflags_c)
37 STRING_VALUES_ACCESSOR(cflags_cc) 40 STRING_VALUES_ACCESSOR(cflags_cc)
38 STRING_VALUES_ACCESSOR(cflags_objc) 41 STRING_VALUES_ACCESSOR(cflags_objc)
39 STRING_VALUES_ACCESSOR(cflags_objcc) 42 STRING_VALUES_ACCESSOR(cflags_objcc)
40 STRING_VALUES_ACCESSOR(defines) 43 STRING_VALUES_ACCESSOR(defines)
41 DIR_VALUES_ACCESSOR (include_dirs) 44 DIR_VALUES_ACCESSOR (include_dirs)
42 STRING_VALUES_ACCESSOR(ldflags) 45 STRING_VALUES_ACCESSOR(ldflags)
43 DIR_VALUES_ACCESSOR (lib_dirs) 46 DIR_VALUES_ACCESSOR (lib_dirs)
44 // If you add a new one, be sure to update AppendValues(). 47 // ==================================================================
48 // IMPORTANT: If you add a new one, be sure to update AppendValues().
49 // ==================================================================
45 50
46 #undef STRING_VALUES_ACCESSOR 51 #undef STRING_VALUES_ACCESSOR
47 #undef DIR_VALUES_ACCESSOR 52 #undef DIR_VALUES_ACCESSOR
48 53
49 const std::vector<LibFile>& libs() const { return libs_; } 54 const std::vector<LibFile>& libs() const { return libs_; }
50 std::vector<LibFile>& libs() { return libs_; } 55 std::vector<LibFile>& libs() { return libs_; }
51 56
52 bool has_precompiled_headers() const { 57 bool has_precompiled_headers() const {
53 return !precompiled_header_.empty() || !precompiled_source_.is_null(); 58 return !precompiled_header_.empty() || !precompiled_source_.is_null();
54 } 59 }
(...skipping 23 matching lines...) Expand all
78 std::vector<std::string> ldflags_; 83 std::vector<std::string> ldflags_;
79 std::vector<SourceDir> lib_dirs_; 84 std::vector<SourceDir> lib_dirs_;
80 std::vector<LibFile> libs_; 85 std::vector<LibFile> libs_;
81 // If you add a new one, be sure to update AppendValues(). 86 // If you add a new one, be sure to update AppendValues().
82 87
83 std::string precompiled_header_; 88 std::string precompiled_header_;
84 SourceFile precompiled_source_; 89 SourceFile precompiled_source_;
85 }; 90 };
86 91
87 #endif // TOOLS_GN_CONFIG_VALUES_H_ 92 #endif // TOOLS_GN_CONFIG_VALUES_H_
OLDNEW
« no previous file with comments | « tools/gn/command_desc.cc ('k') | tools/gn/config_values.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698