dym: fix zig cross compilation - #44656
Merged
mathetake merged 4 commits intoApr 27, 2026
Merged
Conversation
Signed-off-by: Gal Ovadia <ggalovadia@gmail.com>
Signed-off-by: Gal Ovadia <ggalovadia@gmail.com>
ovadiagal
force-pushed
the
govadia/fix-zig-linker-flag
branch
from
April 24, 2026 20:26
34c2854 to
04c9a8c
Compare
ovadiagal
marked this pull request as ready for review
April 24, 2026 20:27
ovadiagal
requested review from
agrawroh,
mathetake,
mattklein123 and
wbpcode
as code owners
April 24, 2026 20:27
ovadiagal
commented
Apr 24, 2026
| /* | ||
| #cgo darwin LDFLAGS: -Wl,-undefined,dynamic_lookup | ||
| #cgo linux LDFLAGS: -Wl,--unresolved-symbols=ignore-all | ||
| #cgo linux,!zigcc LDFLAGS: -Wl,--unresolved-symbols=ignore-all |
Contributor
Author
There was a problem hiding this comment.
the alternative i think is to instead make this opt in
Suggested change
| #cgo linux,!zigcc LDFLAGS: -Wl,--unresolved-symbols=ignore-all | |
| #cgo linux,gnuld LDFLAGS: -Wl,--unresolved-symbols=ignore-all |
lmk what u think
Member
There was a problem hiding this comment.
hmm. is the issue specific non gnuld is what you are saying? that's weird though !zigcc feels also weird...
Member
There was a problem hiding this comment.
hmm i think we can drop the linux LDFLAGS in the first place I think? the linker flag is only necessary for macos i believe.
Member
There was a problem hiding this comment.
(that's why it's been working before v1.38)
Contributor
Author
There was a problem hiding this comment.
updated to drop the entire line
Member
|
@mathetake Could you please take a look at this one? |
mathetake
approved these changes
Apr 27, 2026
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.
The directive
#cgo linux LDFLAGS: -Wl,--unresolved-symbols=ignore-allpasses the--unresolved-symbols=ignore-allflag to the linker when compiling Go dynamic modules.This flag is not supported in zig: ziglang/zig#21007.
When trying to bump dynamic-modules-examples to v1.38.0:
Commit Message: dym: fix zig cross compilation
Additional Description:
Risk Level: Low
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]