Use Starlark tuples for C++ object-file groups - #814
Conversation
|
@lberki can you take a quick look at this one? I know you added some of these freezes. |
|
Ran some benchmarks on this and #809. Effects range from negligible to 0.05% increases in Post-Analysis JVM Heap Memory (nothing that should trip alerts). |
|
From my POV, this works; all I care about is that these values are immutable, and a frozen list and a tuple both are good enough for the job. I guess lists fit the use case "philosophically" more, since the arity of a tuple is part of its type and with this change, you are effectively introducing a field whose type is a tuple of unknown arity. That said, it's appealing to remove the |
Store private
_ObjectFileGroupInfo.object_filescollections as immutable Starlark tuples instead of Java-backed_cc_internal.freezelists. Tuple iteration preserves object order, generated-directory expansion, and whole-archive grouping while removing the module's remainingcc_internaldependency.Validation:
buildifier -mode=checkand 30 passing link-variable and Linux, macOS, and Windows toolchain-feature analysis tests.