icc(或 mpiicc)-E 标志有什么作用?
What does the icc (or mpiicc) -E flag do?
我在构建脚本中遇到了一个神秘标志。它执行类似
的命令
mpiicc -E driver.F90 > driver.tmp.f90
这在 driver.tmp.f90 的顶部放置了一些预处理器指令,但在其他方面与 driver.F90 相同。在这种情况下,它看起来像这样:
# 1 "driver.F90"
# 1 "/usr/include/stdc-predef.h" 1
# 1 "driver.F90" 2
我在 man 条目或英特尔网站上找不到 -E 标志的描述。那么这个flag到底是做什么用的呢?
对于 Intel 和 Gnu C 编译器,-E 标志导致编译器 运行 文件上的 C 预处理器,并将输出发送到标准输出。来自 icc 手册页
-E
Causes the preprocessor to send output to stdout.
Arguments:
None
Default:
OFF Preprocessed source files are output to
the compiler.
Description:
This option causes the preprocessor to send output to
stdout. Compilation stops when the files have been pre-
processed.
When you specify this option, the compiler's preprocessor
expands your source module and writes the result to std-
out. The preprocessed source contains #line directives,
which the compiler uses to determine the source file and
line number.
我在构建脚本中遇到了一个神秘标志。它执行类似
的命令mpiicc -E driver.F90 > driver.tmp.f90
这在 driver.tmp.f90 的顶部放置了一些预处理器指令,但在其他方面与 driver.F90 相同。在这种情况下,它看起来像这样:
# 1 "driver.F90"
# 1 "/usr/include/stdc-predef.h" 1
# 1 "driver.F90" 2
我在 man 条目或英特尔网站上找不到 -E 标志的描述。那么这个flag到底是做什么用的呢?
对于 Intel 和 Gnu C 编译器,-E 标志导致编译器 运行 文件上的 C 预处理器,并将输出发送到标准输出。来自 icc 手册页
-E
Causes the preprocessor to send output to stdout.
Arguments:
None
Default:
OFF Preprocessed source files are output to
the compiler.
Description:
This option causes the preprocessor to send output to
stdout. Compilation stops when the files have been pre-
processed.
When you specify this option, the compiler's preprocessor
expands your source module and writes the result to std-
out. The preprocessed source contains #line directives,
which the compiler uses to determine the source file and
line number.