- -c Compile or assemble code, but do not link
- -c 编译或者汇编代码,但是不链接
- -S Stop after compiling, but do not assemble
- -S 在编译之后停止,但不汇编
- -E Stop after preprocessing, but do not compile
- -E 预处理后停止,但不编译
- -o Specifies the output filename to use
- -o 指定输出文件的名称
- -v Display the commands used at each stage of compilation
- -v 显示编译的每个阶段使用的命令
- -std Specifies the language standard to use
- -std 指定要用的语言标准
- -g Produce debugging information
- -g 产生调试信息
- -pg Produce extra code used by gprof for profiling
- -pg 产生额外信息,被gprof用来做profilling
- -O Optimize executable code
- -O 优化可执行代码
- -W Sets compiler warning message level
- -W 设置编译器的警报级别
- -pedantic Issue mandatory diagnostics listing in the C standard
- -pedantic 发出在C标准中列出的强制性诊断?
- -I Specify directories for include files
- -I 指定文件包含的目录
- -L Specify directories for library files
- -L 指定库目录
- -D Predefine macros used in the source code
- -D 预定义在源代码中出现的宏
- -U Cancel any defined macros
- -U 取消所有定义的宏
- -f Specify options used to control the behavior of the compiler
- -f 指定用来控制编译器行为的选项
- -m Specify hardware-dependant options
- -m 指定与硬件相关的选项
原文出处:http://blog.youkuaiyun.com/bendanban/article/details/8656240