Commit 2485b51
committed
feat(dispatcher): auto-reconstruct MSVC build environment for cl.exe
- dynamically derives MSVC include/lib paths from cl.exe location
- discovers latest Windows SDK (ucrt, um, shared) and injects headers/libs
- eliminates dependency on vcvarsall.bat / Developer Command Prompt
- enables native compilation from arbitrary shells and subprocesses
- applies env only to compiler subprocess (no global pollution)
- adds debug visibility for derived INCLUDE/LIB paths
Implementation:
- infer MSVC root via cl.exe path traversal
- resolve SDK include/lib directories from Windows Kits
- construct minimal compile env (INCLUDE, LIB)
- pass env to subprocess.run() for isolated execution
This allows omnipkg to compile C extensions in fully unmanaged
environments (daemon workers, CI, user shells) without requiring
pre-configured toolchains.
Modified:
• src/omnipkg/dispatcher.py (+40/-1 lines)
[gitship-generated]1 parent a55037e commit 2485b51
1 file changed
Lines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
463 | 502 | | |
464 | | - | |
| 503 | + | |
465 | 504 | | |
466 | 505 | | |
467 | 506 | | |
| |||
0 commit comments