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

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

Issue 1752033002: Add "create_bundle" target in order to support bundle with gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-bundle-data
Patch Set: Add unit tests, address comments, update docs and format with clang-format Created 4 years, 9 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/ninja_target_writer.cc ('k') | tools/gn/substitution_type.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_SUBSTITUTION_TYPE_H_ 5 #ifndef TOOLS_GN_SUBSTITUTION_TYPE_H_
6 #define TOOLS_GN_SUBSTITUTION_TYPE_H_ 6 #define TOOLS_GN_SUBSTITUTION_TYPE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 class Err; 10 class Err;
(...skipping 14 matching lines...) Expand all
25 25
26 // Valid for all compiler tools. 26 // Valid for all compiler tools.
27 SUBSTITUTION_SOURCE_NAME_PART, // {{source_name_part}} 27 SUBSTITUTION_SOURCE_NAME_PART, // {{source_name_part}}
28 SUBSTITUTION_SOURCE_FILE_PART, // {{source_file_part}} 28 SUBSTITUTION_SOURCE_FILE_PART, // {{source_file_part}}
29 SUBSTITUTION_SOURCE_DIR, // {{source_dir}} 29 SUBSTITUTION_SOURCE_DIR, // {{source_dir}}
30 SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR, // {{root_relative_dir}} 30 SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR, // {{root_relative_dir}}
31 SUBSTITUTION_SOURCE_GEN_DIR, // {{source_gen_dir}} 31 SUBSTITUTION_SOURCE_GEN_DIR, // {{source_gen_dir}}
32 SUBSTITUTION_SOURCE_OUT_DIR, // {{source_out_dir}} 32 SUBSTITUTION_SOURCE_OUT_DIR, // {{source_out_dir}}
33 33
34 // Valid for all compiler and linker tools. These depend on the target and 34 // Valid for all compiler and linker tools. These depend on the target and
35 // no not vary on a per-file basis. 35 // do not vary on a per-file basis.
36 SUBSTITUTION_LABEL, // {{label}} 36 SUBSTITUTION_LABEL, // {{label}}
37 SUBSTITUTION_LABEL_NAME, // {{label_name}} 37 SUBSTITUTION_LABEL_NAME, // {{label_name}}
38 SUBSTITUTION_ROOT_GEN_DIR, // {{root_gen_dir}} 38 SUBSTITUTION_ROOT_GEN_DIR, // {{root_gen_dir}}
39 SUBSTITUTION_ROOT_OUT_DIR, // {{root_out_dir}} 39 SUBSTITUTION_ROOT_OUT_DIR, // {{root_out_dir}}
40 SUBSTITUTION_TARGET_GEN_DIR, // {{target_gen_dir}} 40 SUBSTITUTION_TARGET_GEN_DIR, // {{target_gen_dir}}
41 SUBSTITUTION_TARGET_OUT_DIR, // {{target_out_dir}} 41 SUBSTITUTION_TARGET_OUT_DIR, // {{target_out_dir}}
42 SUBSTITUTION_TARGET_OUTPUT_NAME, // {{target_output_name}} 42 SUBSTITUTION_TARGET_OUTPUT_NAME, // {{target_output_name}}
43 43
44 // Valid for compiler tools. 44 // Valid for compiler tools.
45 SUBSTITUTION_ASMFLAGS, // {{asmflags}} 45 SUBSTITUTION_ASMFLAGS, // {{asmflags}}
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // Returns true if the given substitution is valid for the named purpose. 110 // Returns true if the given substitution is valid for the named purpose.
111 bool IsValidBundleDataSubstitution(SubstitutionType type); 111 bool IsValidBundleDataSubstitution(SubstitutionType type);
112 bool IsValidSourceSubstitution(SubstitutionType type); 112 bool IsValidSourceSubstitution(SubstitutionType type);
113 // Both compiler and linker tools. 113 // Both compiler and linker tools.
114 bool IsValidToolSubstitution(SubstitutionType type); 114 bool IsValidToolSubstitution(SubstitutionType type);
115 bool IsValidCompilerSubstitution(SubstitutionType type); 115 bool IsValidCompilerSubstitution(SubstitutionType type);
116 bool IsValidCompilerOutputsSubstitution(SubstitutionType type); 116 bool IsValidCompilerOutputsSubstitution(SubstitutionType type);
117 bool IsValidLinkerSubstitution(SubstitutionType type); 117 bool IsValidLinkerSubstitution(SubstitutionType type);
118 bool IsValidLinkerOutputsSubstitution(SubstitutionType type); 118 bool IsValidLinkerOutputsSubstitution(SubstitutionType type);
119 bool IsValidCopySubstitution(SubstitutionType type); 119 bool IsValidCopySubstitution(SubstitutionType type);
120 bool IsValidCompileXCassetsSubstitution(SubstitutionType type);
120 121
121 // Like the "IsValid..." version above but checks a list of types and sets a 122 // Like the "IsValid..." version above but checks a list of types and sets a
122 // an error blaming the given source if the test fails. 123 // an error blaming the given source if the test fails.
123 bool EnsureValidSourcesSubstitutions( 124 bool EnsureValidSourcesSubstitutions(
124 const std::vector<SubstitutionType>& types, 125 const std::vector<SubstitutionType>& types,
125 const ParseNode* origin, 126 const ParseNode* origin,
126 Err* err); 127 Err* err);
127 128
128 #endif // TOOLS_GN_SUBSTITUTION_TYPE_H_ 129 #endif // TOOLS_GN_SUBSTITUTION_TYPE_H_
OLDNEW
« no previous file with comments | « tools/gn/ninja_target_writer.cc ('k') | tools/gn/substitution_type.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698