commit | ece3ec725475e958210be1d5547e91df05a454dd | [log] [tgz] |
---|---|---|
author | Googler <noreply@google.com> | Thu Sep 03 14:40:49 2020 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Thu Sep 03 14:42:17 2020 -0700 |
tree | f1d04b57687e772304177534e8b6791db8747d60 | |
parent | 27d7ac7cd10a91c0d51722134b94ffd931078368 [diff] |
bazel packages: improve space efficiency of generator_{function,location} attributes by leveraging the recently introduced sparse representation of AttributeContainer. Before this change, generator_* attributes were recorded explicitly, costing about 10 bytes (ignoring space to store the values) per generated rule. When callstack is recorded, this is redundant information. This change derives the attributes from the rule's instantiation call stack, if and only if the --record_rule_instantiation_callstack flag is enabled. When returning attribute value: If attribute is not explicitly stored, infer it from callstack. During rule creation: If callstack recording is enabled, do not write generator_{location,function} attributes. Consequences: - This change should be a functional no-op, irrespective of whether callstack recording is enabled or not. - If callstack recording is enabled, memory consumption is reduced - In some corner cases generator_function returned is different, and likely fixes existing bug. NOTE: No changes to generator_name, since that is NOT available in the callstack. PiperOrigin-RevId: 329996187
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md