swipelab_webp: the Windows build hook's cl.exe command exceeds the command-line limit, so banlu cannot build for Windows #1

Merged
agra merged 1 commit from fix/2964-hook-command-length into master 2026-10-12 16:35:57 +03:00
Owner

Tracker: #2964

The libwebp sources reach the compiler in a response file (@libwebp_sources.rsp in the hook's output directory), so the command line holds one path for them, whatever the source count or cache path. On Windows, native_toolchain_c 0.17.6 runs cl.exe through cmd.exe (runInShell), which caps a command at 8191 characters; the 109 sources by absolute path exceeded it. CBuilder already records every file under the libwebpPath include dir as a dependency, so hook caching is unchanged.

Verification:

  • be (Windows 11, MSVC 14.44), banlu 2d64c113, LOCALAPPDATA set to a path 7 characters longer than Local System's: without the change, flutter build windows --release fails in build_hooks with The command line is too long.; with it, it builds app.exe and swipelab_webp.dll, and the cl.exe command is 711 characters.
  • macOS: dart run example/webp_test.dart builds the dylib through the response file (clang) and passes.

Head: 8cbfb74cb5

Tracker: [#2964](https://sak.swipelab.com/tasks/2964) The libwebp sources reach the compiler in a response file (`@libwebp_sources.rsp` in the hook's output directory), so the command line holds one path for them, whatever the source count or cache path. On Windows, native_toolchain_c 0.17.6 runs `cl.exe` through cmd.exe (`runInShell`), which caps a command at 8191 characters; the 109 sources by absolute path exceeded it. CBuilder already records every file under the `libwebpPath` include dir as a dependency, so hook caching is unchanged. Verification: - `be` (Windows 11, MSVC 14.44), banlu 2d64c113, `LOCALAPPDATA` set to a path 7 characters longer than Local System's: without the change, `flutter build windows --release` fails in build_hooks with `The command line is too long.`; with it, it builds `app.exe` and `swipelab_webp.dll`, and the `cl.exe` command is 711 characters. - macOS: `dart run example/webp_test.dart` builds the dylib through the response file (clang) and passes. Head: 8cbfb74cb5049887efb84e52833a1499dbe20466
On Windows, native_toolchain_c runs cl.exe through cmd.exe, which caps a
command at 8191 characters. The 109 libwebp sources by absolute path
exceeded it, more so under Local System's longer %LOCALAPPDATA%.
agra merged commit 9c105c165d into master 2026-10-12 16:35:57 +03:00
agra deleted branch fix/2964-hook-command-length 2026-10-12 16:35:57 +03:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
agra/swipelab_webp!1
No description provided.