Index: tools/gn/substitution_type.cc |
diff --git a/tools/gn/substitution_type.cc b/tools/gn/substitution_type.cc |
index b66e0870965d7dc26495643e73c45c750b5789a3..93a32bd6e4c57264ac9d7e283e70ee997796083c 100644 |
--- a/tools/gn/substitution_type.cc |
+++ b/tools/gn/substitution_type.cc |
@@ -46,6 +46,11 @@ const char* kSubstitutionNames[SUBSTITUTION_NUM_TYPES] = { |
"{{output_extension}}", // SUBSTITUTION_OUTPUT_EXTENSION |
"{{solibs}}", // SUBSTITUTION_SOLIBS |
+ "{{bundle_root_dir}}", // SUBSTITUTION_BUNDLE_ROOT_DIR |
+ "{{bundle_resources_dir}}", // SUBSTITUTION_BUNDLE_RESOURCES_DIR |
+ "{{bundle_executable_dir}}", // SUBSTITUTION_BUNDLE_EXECUTABLE_DIR |
+ "{{bundle_plugins_dir}}", // SUBSTITUTION_BUNDLE_PLUGINS_DIR |
+ |
"{{response_file_name}}", // SUBSTITUTION_RSP_FILE_NAME |
}; |
@@ -89,6 +94,11 @@ const char* kSubstitutionNinjaNames[SUBSTITUTION_NUM_TYPES] = { |
"output_extension", // SUBSTITUTION_OUTPUT_EXTENSION |
"solibs", // SUBSTITUTION_SOLIBS |
+ "bundle_root_dir", // SUBSTITUTION_BUNDLE_ROOT_DIR |
+ "bundle_resources_dir", // SUBSTITUTION_BUNDLE_RESOURCES_DIR |
+ "bundle_executable_dir", // SUBSTITUTION_BUNDLE_EXECUTABLE_DIR |
+ "bundle_plugins_dir", // SUBSTITUTION_BUNDLE_PLUGINS_DIR |
+ |
"rspfile", // SUBSTITUTION_RSP_FILE_NAME |
}; |
@@ -116,6 +126,24 @@ bool SubstitutionIsInOutputDir(SubstitutionType type) { |
type == SUBSTITUTION_TARGET_OUT_DIR; |
} |
+bool SubstitutionIsInBundleDir(SubstitutionType type) { |
+ return type == SUBSTITUTION_BUNDLE_ROOT_DIR || |
+ type == SUBSTITUTION_BUNDLE_RESOURCES_DIR || |
+ type == SUBSTITUTION_BUNDLE_EXECUTABLE_DIR || |
+ type == SUBSTITUTION_BUNDLE_PLUGINS_DIR; |
+} |
+ |
+bool IsValidBundleDataSubstitution(SubstitutionType type) { |
+ return type == SUBSTITUTION_LITERAL || |
+ type == SUBSTITUTION_SOURCE_NAME_PART || |
+ type == SUBSTITUTION_SOURCE_FILE_PART || |
+ type == SUBSTITUTION_SOURCE_ROOT_RELATIVE_DIR || |
+ type == SUBSTITUTION_BUNDLE_ROOT_DIR || |
+ type == SUBSTITUTION_BUNDLE_RESOURCES_DIR || |
+ type == SUBSTITUTION_BUNDLE_EXECUTABLE_DIR || |
+ type == SUBSTITUTION_BUNDLE_PLUGINS_DIR; |
+} |
+ |
bool IsValidSourceSubstitution(SubstitutionType type) { |
return type == SUBSTITUTION_LITERAL || |
type == SUBSTITUTION_SOURCE || |