Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm32-freestanding: dynamic linking unavailable on the specified target #18825

Open
clebert opened this issue Feb 5, 2024 · 2 comments
Open
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@clebert
Copy link

clebert commented Feb 5, 2024

Zig Version

0.12.0-dev.2586+3c7970dc4

Steps to Reproduce and Observed Behavior

zig build-lib src/foo.zig -OReleaseSmall -target wasm32-freestanding -mcpu baseline+simd128 -rdynamic -dynamic
error: dynamic linking unavailable on the specified target

Expected Behavior

The same command works in Zig 0.11 and produces a .wasm file.

@clebert clebert added the bug Observed behavior contradicts documented or intended behavior label Feb 5, 2024
@Luukdegram
Copy link
Member

This behavior was changed in #17815. When upgrading from a tagged release to a master version I recommend checking breaking changes before upgrading. Also, the language reference is worth checking as it was updated with this change also. I will, however, keep this issue open as the compile-error you received is incorrect, as building dynamic libraries is supported for this target (but not what you want in your case).

@clebert
Copy link
Author

clebert commented Feb 5, 2024

Thanks for the quick help. Now that I know what to look for, I found it in the Language Reference (https://ziglang.org/documentation/master/#Freestanding). I missed it before. I was not aware that the breaking changes for master are already documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

2 participants