Commit 2ee7c7e
committed
fix: Discover MSVC include paths for Windows bindgen builds
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).1 parent f464529 commit 2ee7c7e
1 file changed
+38
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
423 | 461 | | |
424 | 462 | | |
425 | 463 | | |
| |||
0 commit comments