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

meson: Install Cargo-generated lib directly #450

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

obiwac
Copy link

@obiwac obiwac commented Jan 10, 2025

Currently, when building with Meson, an archive is created containing the archive generated by Cargo (so not directly the object files contained withing the Cargo-generated archive). This causes issues when linking and required an explicit ranlib or ar -s step to be issued before the library is usable:

ld: archive member 'libwgpu_native.a' not a mach-o file in '.../libwgpu_native.a'

It doesn't look like static_library really supports this kind of usecase.

This PR simply installs the static library artifact generated by Cargo directly instead. Unfortunately I don't think there's an elegant way to pass a meson library object to pkg.generate in this situation, so I've just set libraries manually (since it allows arbitrary strings). I'm by no means a Meson expert so do let me know if there's a better way that I'm overlooking :)

@KentaTheBugMaker pinging you as the original author of meson.build (#84) for your input.

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