Skip to content

Conversation

@keith
Copy link
Member

@keith keith commented Jan 22, 2026

Previously if you had an archive in the srcs of a cc_library and set
alwayslink=True that was ignored. You had to have named the library .lo
(arguably an implementation detail) to get the desired behavior.

@keith
Copy link
Member Author

keith commented Jan 22, 2026

I'm curious to hear from folks with more context on if this is a good idea to change. previously if you had both .a and .c files in srcs, alwayslink would only apply to the .c files, which might have been intentional-ish. But on the other hand I think this behavior was surprising in the opposite way. (previously the workaround would be to use cc_import(alwayslink=True))

@keith
Copy link
Member Author

keith commented Jan 22, 2026

i will exclude from CI if we get consensus on this being a good idea

Previously if you had an archive in the srcs of a cc_library and set
alwayslink=True that was ignored. You had to have named the library .lo
(arguably an implementation detail) to get the desired behavior.
@keith keith force-pushed the ks/make-cc_library-alwayslink-true-apply-to-.a-in-srcs branch from 7dcb1ba to e80ce8d Compare January 26, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant