GCC支持命令文件 [英] Does GCC support command files

查看:192
本文介绍了GCC支持命令文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MSVC编译器支持用于通过命令行的命令文件选项。这主要是由于对命令行参数的大小的限制,可以传递到 CreateProcess 调用。

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

这在Linux系统上不是一个问题,但是当执行Unix应用程序的cygwin端口时,作为gcc,相同的限制适用。

This is less of an issue on Linux systems but when executing cygwin ports of Unix applications, such as gcc, the same limits apply.

因此,有没有人知道gcc / g ++是否也支持某种类型的命令文件?

Therefore, does anyone know if gcc/g++ also support some type of command file?

/ p>

Thanks.

推荐答案

当然!

@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.

您也可以使用 xargs ,如果你的平台有它。

You can also jury-rig this type of thing with xargs, if your platform has it.

这篇关于GCC支持命令文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆