Skip to content

linking: alwayslink #175

@junr03

Description

@junr03

@kastiglione brought up an excellent point in #17 (comment) mentioning that the envoy_cc_library rules have an alwayslink = 1 option set. This forces the linker to link all compilation units regardless of use, even when -dead_strip is passed to the linker.

We should make this optional, and make sure that linking is pessimistic enough that we don't run into runtime issues due to missing symbols when -dead_strip is involved.

Size Win

@kastiglione reported a ~2mb reduction. Even as a ceiling this is a very attractive comparison, and thus we should investigate this with high priority.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions