Commit aecdde0
committed
Make patch 0001 the complete upstream #24779 fix (core + flips + test)
Expand patches/0001-win32-arg-parse-embed-guard.patch from the arg.cpp/arg.h
core into the full, submittable upstream change so it can be sent to
llama.cpp verbatim and then dropped here:
- common/arg.cpp + common/arg.h: common_params_parse() parses exactly the
argv it is given; new common_params_parse_main() wrapper carries the
Windows GetCommandLineW UTF-8 recovery (#24779) for the standalone tools.
- ~34 standalone main() call sites across tools/*, examples/* and the
tests/* programs flip common_params_parse(argc, argv, ...) ->
common_params_parse_main(argc, argv, ...).
- tests/test-arg-parser.cpp: regression case asserting common_params_parse
honors a caller-supplied argv (the embedded/JNI contract).
Our build compiles llama.cpp as a subproject (LLAMA_BUILD_TOOLS/TESTS OFF),
so only the arg.{cpp,h} core is compiled here -- the flips + test are
applied but not built in normal CI, and our embedded path (jllama.cpp ->
common_params_parse) is behaviorally identical to before. Validated the
flips + test via a one-off -DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_TESTS=ON
build: the new test compiles and its asserts pass, and a flipped program
(test-thread-safety) builds; test-arg-parser's only failure is its live
ggml.ai download assertion (sandbox network, not the patch). Full patch
applies + reverse-applies cleanly against b9789 (37 files).
Docs updated (CLAUDE.md patches table, breaking-changes row, TODO.md).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SLQk4Fk7vk7R4f2za1KxYg1 parent e14bd43 commit aecdde0
4 files changed
Lines changed: 483 additions & 19 deletions
File tree
- docs/history
- patches
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
249 | 253 | | |
250 | 254 | | |
251 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| |||
0 commit comments