Does GCC support batch files support

MSVC compilers support batch files that are used to pass command line parameters. This is primarily due to the limitation of the size of command line parameters that can be passed to the CreateProcess call.

This applies less to Linux systems, but the same restrictions apply when running cygwin ports for Unix applications such as gcc.

Therefore, does anyone know if gcc / g ++ supports some type of batch file?

Thanks.

+6
source share
1 answer

Of course!

@file Read command-line options from file. The options read are inserted in place of the original @file option. If file does not exist, or cannot be read, then the option will be treated literally, and not removed. Options in file are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The file may itself contain additional @file options; any such options will be processed recursively. 

You can also attach a jury to this type with xargs if your platform has one.

+10
source

Source: https://habr.com/ru/post/895537/


All Articles