Skip to content

Conversation

@cerisier
Copy link
Contributor

Archives are treated differently from object files by the linker.

Object files are unconditionally linked while objects within archives are loaded based on symbol reference from previously listed objects.

Because we use a transitory archive that we then link into a shared library. That archive MUST be linked as --whole-archive (or -force_load on macOS).

I've added a failing test first then the fix which makes the test pass.

@cerisier cerisier force-pushed the cerisier/passthrough-shared-library-with-cc branch from 93fe648 to c8cefbb Compare October 16, 2025 14:30
Copy link
Owner

@aherrmann aherrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thank you!

@aherrmann aherrmann merged commit cbf03e4 into aherrmann:main Oct 16, 2025
17 checks passed
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.

2 participants