feat: support linking using cc_common.link#522
Merged
aherrmann merged 10 commits intoaherrmann:mainfrom Sep 22, 2025
Merged
Conversation
a38a8ec to
37c0d55
Compare
37c0d55 to
e781cba
Compare
I think for now it is fine, however, one could imagine using a cc toolchain that does not use libc
127d933 to
c376e2f
Compare
aherrmann
reviewed
Sep 21, 2025
Owner
aherrmann
left a comment
There was a problem hiding this comment.
This looks good, thank you!
Only some relatively small comments.
Co-authored-by: Andreas Herrmann <[email protected]>
e2806f1 to
d492311
Compare
Owner
Contributor
Author
|
Will have a look today. It's possible that two non conflicting PRs were green and merged but incompatible while combined. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a first reviewable PR addressing #519, part of #480
use_cc_common_linkbool flag, matching similar naming from other rulesets.use_cc_common_link=True, build a static-lib first and link the output usingcc_common.link.cc_common.link, themain_outputattribute for 2 reasons:shared_lib_nameattribute just likecc_shared_librarydoes.zig_test, I preferred a single forward compatible solution with zig 0.14.0 (that lacks -femit=test-obj`)modeortarget.Happy to discuss with you which tests should be added.