Skip to content

fix: add missing libc++ defines for zig 0.15+ bindgen support#398

Merged
messense merged 1 commit intomainfrom
fix-bindgen-exhaustive
Jan 27, 2026
Merged

fix: add missing libc++ defines for zig 0.15+ bindgen support#398
messense merged 1 commit intomainfrom
fix-bindgen-exhaustive

Conversation

@messense
Copy link
Member

Zig 0.15+ libc++ headers require additional defines that were missing from BINDGEN_EXTRA_CLANG_ARGS, causing strstream and other I/O headers to fail when parsed by bindgen's libclang.

Add the following defines:

  • _LIBCPP_HAS_LOCALIZATION=1
  • _LIBCPP_HAS_WIDE_CHARACTERS=1
  • _LIBCPP_HAS_UNICODE=1
  • _LIBCPP_HAS_THREADS=1

@messense messense force-pushed the fix-bindgen-exhaustive branch from 81be251 to e48f97e Compare January 27, 2026 11:24
@messense messense force-pushed the fix-bindgen-exhaustive branch 2 times, most recently from 1828f61 to 07bce3e Compare January 27, 2026 11:37
Zig 0.15+ libc++ headers require additional defines that were missing
from BINDGEN_EXTRA_CLANG_ARGS, causing strstream and other I/O headers
to fail when parsed by bindgen's libclang.

Add the following defines:
- _LIBCPP_HAS_LOCALIZATION=1
- _LIBCPP_HAS_WIDE_CHARACTERS=1
- _LIBCPP_HAS_UNICODE=1
- _LIBCPP_HAS_THREADS=1

Amp-Thread-ID: https://ampcode.com/threads/T-019bff26-4ab1-712c-8cc2-72cd1d8ffd51
Co-authored-by: Amp <amp@ampcode.com>
@messense messense force-pushed the fix-bindgen-exhaustive branch from 07bce3e to 7d307e2 Compare January 27, 2026 11:43
@messense messense merged commit 9ca5edc into main Jan 27, 2026
40 checks passed
@messense messense deleted the fix-bindgen-exhaustive branch January 27, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant