Change #272464
| Category | ffmpeg |
| Changed by | crueter <crueter@eden-emu.dev> |
| Changed at | Wed 24 Jun 2026 10:27:10 |
| Repository | https://git.ffmpeg.org/ffmpeg.git |
| Project | ffmpeg |
| Branch | master |
| Revision | 4ba56d8ab76308adb4c184ffb203933e3a28e1b3 |
Comments
build: Use Make builtin for .objs response files when possible Since 9e857e1f8aeeb655adb9d09bf53add26a27092e2, library.mak generates a response file containing the list of input object files. This was done to avoid hitting the 8192 character command line limit on Windows shells. However, that particular solution still relies on emitting a very long `echo` command that gets delegated to a subshell. This means that, for example, running `make` within problematic shells like Git Bash could still hit the command line length limit when this `echo` step is ran. Other MSYS2 shells are not affected, meaning the previous workaround only helped when running in an MSYS2 environment, but broke when using Git Bash, e.g. for MSVC. This primarily affected `libavcodec` due to the sheer volume of files contained within. To avoid this problem, this commit changes the object emission step to use GNU make's `file` builtin to write the list of object files. `file` itself was introduced in GNU Make 4.0, but FFmpeg still supports old versions--notably Apple's ancient Make 3.81--so for older make versions that don't support this, the old echo subshell is used. This tradeoff should be fine since it's trivial to grab a new-enough Make on Windows, and other platforms that may be stuck with ancient Make versions shouldn't have nearly as restrictive command line limits. Signed-off-by: crueter <crueter@eden-emu.dev>
Changed files
- ffbuild/library.mak