diff options
author | 2016-01-07 16:56:37 +0000 | |
---|---|---|
committer | 2016-01-07 20:20:06 +0000 | |
commit | efe22ec3338a82a0e4c3f5c256f5f86a27fc4f4e (patch) | |
tree | 989a7243eaf6ff39fe46a9cdcc933f04ed76c424 /src/main/protobuf | |
parent | 6ecf17a26b1907362c45410c6399533e48f8c467 (diff) |
Extend crosstool configuration to allow features to specify (expandable) environment variables to pass to actions
--
MOS_MIGRATED_REVID=111608329
Diffstat (limited to 'src/main/protobuf')
-rw-r--r-- | src/main/protobuf/crosstool_config.proto | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/protobuf/crosstool_config.proto b/src/main/protobuf/crosstool_config.proto index a420403462..d34b29e136 100644 --- a/src/main/protobuf/crosstool_config.proto +++ b/src/main/protobuf/crosstool_config.proto @@ -85,6 +85,14 @@ message CToolchain { repeated FlagGroup flag_group = 2; } + // A key/value pair to be added as an environment variable. The value of + // this pair is expanded in the same way as is described in FlagGroup. + // The key remains an unexpanded string literal. + message EnvEntry { + required string key = 1; + required string value = 2; + } + // A set of features; used to support logical 'and' when specifying feature // requirements in FlagSet and Feature. message FeatureSet { @@ -119,7 +127,27 @@ message CToolchain { repeated string expand_if_all_available = 4; } + // A set of environment variables that are expanded in the command line for + // specific actions. + message EnvSet { + // The actions this env set applies to; each env set must specify at + // least one action. + repeated string action = 1; + + // The environment variables applied via this env set. + repeated EnvEntry env_entry = 2; + + // A list of feature sets defining when this env set gets applied. The + // env set will be applied when any of the feature sets fully apply, that + // is, when all features of the feature set are enabled. + // + // If 'with_feature' is omitted, the env set will be applied + // unconditionally for every action specified. + repeated FeatureSet with_feature = 3; + } + // Contains all flag specifications for one feature. + // Next ID: 7 message Feature { // The feature's name. Feature names are generally defined by Bazel; it is // possible to introduce a feature without a change to Bazel by adding a @@ -131,6 +159,10 @@ message CToolchain { // actions in the modes that they are specified for. repeated FlagSet flag_set = 2; + // If the given feature is enabled, the env sets will be applied for the + // actions in the modes that they are specified for. + repeated EnvSet env_set = 6; + // A list of feature sets defining when this feature is supported by the // toolchain. The feature is supported if any of the feature sets fully // apply, that is, when all features of a feature set are enabled. |