-FreeBSD 上 cc 的管道标志 10.x

-pipe flag of cc on FreeBSD 10.x

昨天我正在研究 FreeBSD jails。根据文档,我 运行 命令 make buildworld 并使用 cc.
编译了很多文件 在日志中我看到了类似的东西:

cc ... -pipe ... file.c

现在我对 -pipe 旗帜很好奇。我也在手册页中进行了搜索,但没有找到有关此标志的任何信息。
你知道这个标志到底是做什么的吗?

假设您的 cc 是 Clang,在您的 FreeBSD 版本上不可用的 Clang 更高版本中添加了详细的手册页。 -pipe 描述为:

-pipe, --pipe
Use pipes between commands, when possible

https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-pipe

我向 Salvatore Sanfilippo(Redis 的作者)发送了一封电子邮件并询问了上述问题,他回复了:

Hello, it simply will use Unix pipes instead of files in order to "chain" the different stages needed for the compilation process. When -pipe is used, as GCC starts to emit the assembler code, the assembler will start to read from the pipe and emit the machine code and so forth. It should optimize compilation speed, but in practice it helps very little AFAIK.

多亏了他