Skip to content

Command line length limits are easily exceeded on Windows #514

@alexcrichton

Description

@alexcrichton

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions