diff options
author | Marcel Hlopko <hlopko@google.com> | 2016-11-11 08:46:08 +0000 |
---|---|---|
committer | Klaus Aehlig <aehlig@google.com> | 2016-11-11 10:05:32 +0000 |
commit | c6c618ceccd2ac625f2841662398d9856b11342c (patch) | |
tree | dda1dabfdc5e50fc962478c6a707a0c3cbeeaf87 /src/main/protobuf/crosstool_config.proto | |
parent | 33aa306d3420ba406acdf998208f438e88bebe4b (diff) |
Introduce structured build variables in Crosstool
This cl adds a 3rd type of build variable - structs. Structs have fields, which
can hold any build variable type (including structs). In the CROSSTOOl, the
fields are accessed by the dot-notation, e.g.:
flag_group {
iterate_over: "libraries_to_link
flag_group {
iterate_over: "libraries_to_link.libraries"
flag: "-L%{libraries_to_link.libraries.directory}"
}
}
As a memory optimization, we also add StructureSequences. These save us from
the overhead of individual StructureValue objects.
--
MOS_MIGRATED_REVID=138851774
Diffstat (limited to 'src/main/protobuf/crosstool_config.proto')
-rw-r--r-- | src/main/protobuf/crosstool_config.proto | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/protobuf/crosstool_config.proto b/src/main/protobuf/crosstool_config.proto index daff025585..739ec3cf31 100644 --- a/src/main/protobuf/crosstool_config.proto +++ b/src/main/protobuf/crosstool_config.proto @@ -63,6 +63,15 @@ message CToolchain { // ... will get expanded to -I /to/path1 -I /to/path2 ... for each // include_path /to/pathN. // + // To expand a variable of structure type, use dot-notation, e.g.: + // flag_group { + // iterate_over: "libraries_to_link" + // flag_group { + // iterate_over: "libraries_to_link.libraries" + // flag: "-L%{libraries_to_link.libraries.directory}" + // } + // } + // // Flag groups can be nested; if they are, the flag group must only contain // other flag groups (no flags) so the order is unambiguously specified. // In order to expand a variable of nested lists, 'iterate_over' can be used. |