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

Unified Diff: tools/gn/substitution_type.cc

Issue 2387763002: Support for source_target_relative expansion in GN (Closed)
Patch Set: Rebased Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/substitution_type.h ('k') | tools/gn/substitution_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/substitution_type.cc
diff --git a/tools/gn/substitution_type.cc b/tools/gn/substitution_type.cc
index 7730070c4af1667851dc51334dd19b21954c7ed6..c6ea38597dd44c2118e9f5aa45bbc2e382b933eb 100644
--- a/tools/gn/substitution_type.cc
+++ b/tools/gn/substitution_type.cc
@@ -21,6 +21,7 @@ const char* kSubstitutionNames[SUBSTITUTION_NUM_TYPES] = {
"{{source_root_relative_dir}}", // SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR
"{{source_gen_dir}}", // SUBSTITUTION_SOURCE_GEN_DIR
"{{source_out_dir}}", // SUBSTITUTION_SOURCE_OUT_DIR
+ "{{source_target_relative}}", // SUBSTITUTION_SOURCE_TARGET_RELATIVE
"{{label}}", // SUBSTITUTION_LABEL
"{{label_name}}", // SUBSTITUTION_LABEL_NAME
@@ -70,6 +71,7 @@ const char* kSubstitutionNinjaNames[SUBSTITUTION_NUM_TYPES] = {
"source_root_relative_dir", // SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR
"source_gen_dir", // SUBSTITUTION_SOURCE_GEN_DIR
"source_out_dir", // SUBSTITUTION_SOURCE_OUT_DIR
+ "source_target_relative", // SUBSTITUTION_SOURCE_TARGET_RELATIVE
"label", // SUBSTITUTION_LABEL
"label_name", // SUBSTITUTION_LABEL_NAME
@@ -160,7 +162,8 @@ bool IsValidSourceSubstitution(SubstitutionType type) {
type == SUBSTITUTION_SOURCE_DIR ||
type == SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR ||
type == SUBSTITUTION_SOURCE_GEN_DIR ||
- type == SUBSTITUTION_SOURCE_OUT_DIR;
+ type == SUBSTITUTION_SOURCE_OUT_DIR ||
+ type == SUBSTITUTION_SOURCE_TARGET_RELATIVE;
}
bool IsValidToolSubstitution(SubstitutionType type) {
« no previous file with comments | « tools/gn/substitution_type.h ('k') | tools/gn/substitution_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698