Skip to content

refactor: share Zig C/C++ link setup - #716

Open
cerisier wants to merge 1 commit into
cerisier/incremental-compile-argumentsfrom
cerisier/zig-cc-link-setup
Open

cerisier wants to merge 1 commit into
cerisier/incremental-compile-argumentsfrom
cerisier/zig-cc-link-setup

Conversation

@cerisier

Copy link
Copy Markdown
Member

Before

Zig binaries, tests, and shared libraries each set up their own C/C++ final link. All three wrap a Zig archive in a linking context and pass it alongside the native dependencies.

After

The three rule kinds share one cc_common.link call. The final link receives the same archives, flags, and dependencies, and shared libraries still use alwayslink. This gives the direct-object work one place to change how Zig outputs reach the linker.

Zig binaries, tests, and shared libraries use the same C/C++ link setup when cc_common.link owns the final link. Keep the existing archive inputs and the shared-library alwayslink behavior.
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