Dear GCC Developers,
I encountered an issue where GCC fails to compile when the total
command-line argument
size exceeds 128KB.
In contrast, Clang can handle the same compilation scenario without issues.
Is this a known limitation in GCC, and are there any workarounds or plans
to address this?
Would response files (e.g., @file) be recommended for cases like this?
I'm looking forward to hearing your thoughts.
Reproduction Steps: (Applicable to all versions of gcc)
1) echo 'int main() { return 0; }' > test.c
2) ARGS=$(perl -e 'print "-I/tmp " x 16384')
3) gcc test.c $ARGS -o test
gcc: fatal error: cannot execute ‘/usr/lib/gcc/x86_64-linux-gnu/11/cc1’:
execv: Argument list too long
compilation terminated.
However, clang can able to produce output.
Best Regards,
Geeta D