Skip to content

Conversation

@Michael-A-Kuykendall
Copy link
Contributor

Fixes bindgen compilation error on Windows MSVC with GPU features: 'stdbool.h' file not found in ggml.h:207

Root cause: bindgen's libclang cannot find MSVC standard C headers (stdbool.h, stddef.h, etc.) without explicit -isystem paths.

Solution:

  • Use cc::Build to discover MSVC environment and extract INCLUDE paths
  • Pass each path via -isystem to bindgen's clang
  • Add MSVC compatibility flags (--target, -fms-compatibility, -fms-extensions)

Pattern follows existing Android fix at lines 390-414.

Enables Windows MSVC builds with GPU backends (cuda/vulkan/opencl). Tested in production with shimmy v1.6.0 (295/295 tests passing).

Fixes bindgen compilation error on Windows MSVC with GPU features:
'stdbool.h' file not found in ggml.h:207

Root cause: bindgen's libclang cannot find MSVC standard C headers
(stdbool.h, stddef.h, etc.) without explicit -isystem paths.

Solution:
- Use cc::Build to discover MSVC environment and extract INCLUDE paths
- Pass each path via -isystem to bindgen's clang
- Add MSVC compatibility flags (--target, -fms-compatibility, -fms-extensions)

Pattern follows existing Android fix at lines 390-414.

Enables Windows MSVC builds with GPU backends (cuda/vulkan/opencl).
Tested in production with shimmy v1.6.0 (295/295 tests passing).
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.

2 participants