-
-
Couldn't load subscription status.
- Fork 1.8k
Closed
Description
A user porting www.flintlib.org to meson ran into a commandline length limit
when it tried to link > 3300 files into a single library, with error
ninja: fatal: posix_spawn: Argument list too long
https://www.in-ulm.de/~mascheck/various/argmax/
says cygwin has the tightest limit on commandline length, but FreeBSD also has a smallish limit.
I was able to reproduce the error on FreeBSD with the following script:
#!/bin/sh
set -ex
n=1
echo "project('toolong', 'c')" > meson.build
echo "srcs = [" >> meson.build
while test $n -lt 12000
do
echo "int f$n(int x) { return x + $n; }" > foo$n.c
echo " 'foo$n.c'," >> meson.build
n=$(expr $n + 1)
done
echo "]" >> meson.build
echo "library('toolong', srcs)" >> meson.build
meson . btmp
cd btmp
ninja -v
CMake successfully avoids the problem by using a response file, and meson should, too.
(Though ideally it should avoid them when not needed, as they do make debugging a little harder.)
Metadata
Metadata
Assignees
Labels
No labels