Skip to content

Export NDK libclang path for bindgen#209

Merged
bbqsrc merged 1 commit into
bbqsrc:mainfrom
StantonMatt:export-libclang-path
Jun 3, 2026
Merged

Export NDK libclang path for bindgen#209
bbqsrc merged 1 commit into
bbqsrc:mainfrom
StantonMatt:export-libclang-path

Conversation

@StantonMatt

Copy link
Copy Markdown
Contributor

Fixes #201.

This exports LIBCLANG_PATH when the selected NDK contains a host libclang shared library, so bindgen/clang-sys can find the NDK-provided libclang without extra user configuration.

The lookup covers the host layouts I found in current and older NDK prebuilts:

  • lib for current Linux/macOS layouts
  • lib64 for older Linux/macOS layouts
  • bin for Windows libclang.dll
  • musl/lib for Linux musl prebuilts, preferred first on musl hosts

Verification:

  • cargo fmt --all -- --check
  • cargo test cargo::tests --locked
  • cargo test --locked
  • cargo clippy -- -D warnings
  • git diff --check

@bbqsrc

bbqsrc commented Jun 3, 2026

Copy link
Copy Markdown
Owner

@StantonMatt conflicts, please fix

Signed-off-by: Matthew Stanton <stantonmatthewj@gmail.com>
@StantonMatt StantonMatt force-pushed the export-libclang-path branch from 2f72540 to e77bccf Compare June 3, 2026 14:32
@StantonMatt

Copy link
Copy Markdown
Contributor Author

Rebased onto current main; the PR is mergeable again at e77bccf. The new hosted CI run is green.

@bbqsrc bbqsrc merged commit 98e93d2 into bbqsrc:main Jun 3, 2026
18 checks passed
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.

LIBCLANG_PATH should be set for BindGen to work

2 participants