Skip to content

Include versioned Android target in bindgen clang args for NDK 30 - #217

Merged
bbqsrc merged 2 commits into
mainfrom
copilot/fix-unversioned-target-triples
Sep 14, 2026
Merged

bbqsrc merged 2 commits into
mainfrom
copilot/fix-unversioned-target-triples

Conversation

Copilot AI commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

NDK 30 rejects unversioned Android triples in clang invocations. cargo-ndk was exporting bindgen clang args without the API-suffixed target, which could surface Unversioned target triples are not supported! in bindgen-driven builds.

  • Bindgen target propagation

    • Updated build_env to include the existing versioned clang_target in BINDGEN_EXTRA_CLANG_ARGS_<triple>.
    • This aligns bindgen’s clang invocation with the same --target=<triple><api> already used for compiler/linker paths.
  • Coverage for regression

    • Added a focused unit test asserting bindgen args include a versioned Android target for aarch64-linux-android.
let bindgen_args = format!(
    "{clang_target} --sysroot={} -I{}",
    cargo_ndk_sysroot_path.display(),
    extra_include
);

Copilot AI linked an issue Sep 9, 2026 that may be closed by this pull request
Co-authored-by: bbqsrc <279099+bbqsrc@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unversioned target triples issue in NDK 30 Include versioned Android target in bindgen clang args for NDK 30 Sep 9, 2026
Copilot AI requested a review from bbqsrc September 9, 2026 16:43
@bbqsrc
bbqsrc marked this pull request as ready for review September 10, 2026 12:43
@bbqsrc
bbqsrc merged commit ee7329a into main Sep 14, 2026
36 checks passed
@bbqsrc
bbqsrc deleted the copilot/fix-unversioned-target-triples branch September 14, 2026 20:58
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.

Unversioned target triples are not supported!

2 participants