wasi-libc icon indicating copy to clipboard operation
wasi-libc copied to clipboard

Command line length limits are easily exceeded on Windows

Open alexcrichton opened this issue 1 year ago • 1 comments
trafficstars

This line in the header file is quite large and can quickly run into command line length limits on Windows. I've debugged this a few times on wasi-sdk PRs now and some rough math shows:

  • Command line length limits are ~8192 bytes on Windows by default
  • 86 header files, adding up to 4778 bytes, are removed in that line
  • This leaves roughly 39 bytes for the install prefix to be able to work correctly

A build prefix such as D:/a/wasi-sdk/wasi-sdk/build/sysroot/install just exceeds this limit. Apparently the failure mode is that this command line is silently truncated and files aren't removed. This leads to errors elsewhere in the build where it depended on files being removed.

alexcrichton avatar Jul 15 '24 21:07 alexcrichton

So frustrating...

sbc100 avatar Jul 15 '24 23:07 sbc100