Unverified Commit 44ecd418 authored by Joyee Cheung's avatar Joyee Cheung Committed by James M Snell
Browse files

build: pass directory instead of list of files to js2c.py

On Windows there is a limit to the length of commands, so there
will be an error once the lengths of the JS file names combined
exceed that limit. This patch modifies js2c.py so that
it now takes a --directory argument to glob for .js and
.mjs files in addition to the list of files passed directly.
We still pass the additional files we include from deps/
directly through the command line, as we only includes some of
them so we cannot simply glob, but those are limited so listing
them out should be fine.

Refs: https://docs.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/command-line-string-limitation

PR-URL: https://github.com/nodejs/node/pull/39069
Refs: https://github.com/nodejs/node/pull/38971


Reviewed-By: default avatarChengzhong Wu <legendecas@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 11430a6d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment