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

Fix bindgen-cli support link static libclang #2644

Merged
merged 2 commits into from
Sep 19, 2023

Conversation

inevity
Copy link
Contributor

@inevity inevity commented Sep 19, 2023

Before we link bindgen with default features including runtime libclang.
After the pr, we can build bindgen-cli with no-defautl-features to link static libclang, such as 'cargo install --locked --no-default-features -F static,logging --path .'
If not , runtime and static feature will be confict reported by the clang-sys.

@pvdrz pvdrz merged commit a960d97 into rust-lang:main Sep 19, 2023
27 checks passed
@pvdrz
Copy link
Contributor

pvdrz commented Sep 19, 2023

Thanks for this!

@ojeda
Copy link
Contributor

ojeda commented Sep 20, 2023

Is there a test for this?

@inevity
Copy link
Contributor Author

inevity commented Sep 20, 2023

Look like the repo did not have a ci? I just test this with change:"bindgen = { path = "../bindgen", version = "=0.65.1", default-features = false, features = ["logging", "which-rustfmt", "__cli", "experimental"] }".
And the pr using the change "bindgen = { path = "../bindgen", version = "=0.65.1", default-features = false, features = [ "__cli", "experimental"] }" which did not have feature:logging and which-rustfmt did not test

@pvdrz
Copy link
Contributor

pvdrz commented Sep 20, 2023

yeah I think this was an oversight when we migrated bindgen to workspaces as we use the dynamic library for clang by default, so unless you've been trying to install bindgen-cli with static support by explicitly passing --features=static it is unlikely that you've noticed this.

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.

3 participants