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

Remove failure when bindgen cc_lib does not contain static library #2742

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jwnrt
Copy link

@jwnrt jwnrt commented Jul 15, 2024

I don't think this failure is required: it's fine to bindgen a library with only headers and no static library. Should this error instead be triggering when the cc_library has non-header files but isn't static?

Fixes #2704

@krasimirgg krasimirgg requested a review from hlopko July 16, 2024 08:26
@hlopko
Copy link
Member

hlopko commented Jul 16, 2024

Thanks @jwnrt, the PR makes sense. Would you mind adding a separate example in examples/bindgen (for example a header that is used from both Rust and C++, and both libraries meet in a common binary) showing everything links together well?

@jwnrt
Copy link
Author

jwnrt commented Jul 16, 2024

Sure, I've added an example, let me know if it matches what you expected
EDIT: also rebased.

@jwnrt jwnrt force-pushed the bindgen-header-only branch 2 times, most recently from 061bbff to 57499cf Compare July 16, 2024 10:42
@jwnrt jwnrt force-pushed the bindgen-header-only branch 2 times, most recently from 4759a02 to 5b4111d Compare August 9, 2024 06:51
@jwnrt
Copy link
Author

jwnrt commented Aug 14, 2024

Fixed those formatting problems (hopefully you folks don't mind me rebasing to keep the branch up to date)

@jwnrt
Copy link
Author

jwnrt commented Sep 13, 2024

Friendly bump: this is ready for review again. We can apply this as a patch downstream, so no rush from me.

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.

rust_bindgen should not require a static library
2 participants