找回密码
 加入计匠网
搜索
热搜: BIOS ACPI CPU Windows
查看: 9276|回复: 0

[转载]cl的编译参数

[复制链接]
发表于 2009-4-15 15:14:27 | 显示全部楼层 |阅读模式
-优化-. R3 m$ |" {5 @& L$ P$ V  [
/O1 最小化空间 minimize space
& Q0 y9 R- n$ ]9 Q' G( R/ r/Op[-] 改善浮点数一致性 improve floating-pt consistency 3 g! c4 e$ [4 y% s3 _! F
/O2 最大化速度 maximize speed   ~7 Y, d# s* Q5 V' K4 N
/Os 优选代码空间 favor code space $ z; r6 ]' J3 U
/Oa 假设没有别名 assume no aliasing
3 v+ N* g% L6 k; m/Ot 优选代码速度 favor code speed - K, w2 w6 e9 q2 A0 D
/Ob 内联展开(默认 n=0) inline expansion (default n=0) ' Q( A5 H  O! A% u
/Ow 假设交叉函数别名 assume cross-function aliasing
" f" r' o9 y% d' z& U/Od 禁用优化(默认值) disable optimizations (default)
+ R& {, J: @& a% y# [/Ox 最大化选项。(/Ogityb2 /Gs) maximum opts. (/Ogityb1 /Gs)
+ l. I- O1 M& u3 e/Og 启用全局优化 enable global optimization & {. }% X5 _% a! E! M+ S
/Oy[-] 启用框架指针省略 enable frame pointer omission ) _2 p! U, c, b& w0 z3 Y1 Q: Z
/Oi 启用内建函数 enable intrinsic functions
$ n0 a8 m! P5 X" D7 z
/ y% j" h3 x4 G+ \/ N, e-代码生成- $ t0 F$ F6 I; Q( e4 v: L$ D
/G3 为 80386 进行优化 optimize for 80386 - p8 K+ l' s2 o( g
/G4 为 80486 进行优化 optimize for 80486
4 \, J, l5 k4 x1 }/GR[-] 启用 C++ RTTI enable C++ RTTI
7 x9 x6 }. A4 I% d/G5 为 Pentium 进行优化 optimize for Pentium
6 X2 Q# C  n+ _/ ?/G6 为 Pentium Pro 进行优化 optimize for Pentium Pro
; a& ?! E" |9 ^4 N4 I/GX[-] 启用 C++ 异常处理(与 /EHsc 相同) enable C++ EH (same as /EHsc)
% U' w4 a) W- @) s" h6 F( h) |/EHs 启用同步 C++ 异常处理 enable synchronous C++ EH
) i$ s+ k& ^1 a% s/GD 为 Windows DLL 进行优化 optimize for Windows DLL , _$ o+ [) d2 U% a% v: c5 k
/GB 为混合模型进行优化(默认) optimize for blended model (default) 6 ?/ y8 U6 D; w+ c
/EHa 启用异步 C++ 异常处理 enable asynchronous C++ EH
) {# e0 Q* }" V0 N# ^) Z  Q/Gd __cdecl 调用约定 __cdecl calling convention . V5 l# C3 m3 g* d* z
/EHc extern“C”默认为 nothrow extern "C" defaults to nothrow
* t( S* v* [! F* R/Gr __fastcall 调用约定 __fastcall calling convention
* r9 J8 ~( m  k/Gi[-] 启用增量编译 enable incremental compilation
: m& p. d  M+ c4 H7 U/Gz __stdcall 调用约定 __stdcall calling convention
6 J8 j1 x9 G) s6 l& \/ I/Gm[-] 启用最小重新生成 enable minimal rebuild
7 }5 G3 L- K# r, d7 F/GA 为 Windows 应用程序进行优化 optimize for Windows Application
+ w' B6 D" \& u/ r6 O/Gf 启用字符串池 enable string pooling
# B& A# Y. G2 X; ^( x" C. U) S/QIfdiv[-] 启用 Pentium FDIV 修复 enable Pentium FDIV fix % h: V5 Z8 x0 q6 B3 |$ f  a8 E* G' b7 X
/GF 启用只读字符串池 enable read-only string pooling
, `- R* G7 a' T7 U5 p  g" U0 o/QI0f[-] 启用 Pentium 0x0f 修复 enable Pentium 0x0f fix . W1 s+ \! @; e, U7 N5 E
/Gy 分隔链接器函数 separate functions for linker $ t2 B7 i' J  _7 [% F
/GZ 启用运行时调试检查 enable runtime debug checks / d  Z0 Q" O1 X
/Gh 启用钩子函数调用 enable hook function call
5 o& r" `* ?# F  f0 ]% w, B/Ge 对所有函数强制堆栈检查 force stack checking for all funcs
, k7 e" X- P, q! J& e6 {$ _/Gs[num] 禁用堆栈检查调用 disable stack checking calls
6 }/ \- F: l+ S" E9 j5 m! j) h& U! d
-输出文件- - {2 D# Q) n8 s7 ^1 @1 F/ D
/Fa[file] 命名程序集列表文件 name assembly listing file
/ a& T0 i. d7 D  Q' D" b/Fo 命名对象文件 name object file
5 V/ }6 V" N% x" K/ D/FA[sc] 配置程序集列表 configure assembly listing
8 j. U4 R4 d/ g9 `. A/Fp 命名预编译头文件 name precompiled header file ) m# a1 G* B5 }2 }
/Fd[file] 命名 .PDB 文件 name .PDB file
+ f2 x/ N7 c) B9 G0 C9 f/Fr[file] 命名源浏览器文件 name source browser file 3 N# H) t! p! V
/Fe 命名可执行文件 name executable file ' a3 X( B) C: }3 B* M8 N( c
/FR[file] 命名扩展 .SBR 文件 name extended .SBR file - _/ j( H0 I! a3 a; J- K/ \
/Fm[file] 命名映射文件 name map file
, [+ E' ~* b, {/ @7 _4 ?3 X9 D& Q, R! a: c- p- b2 w
-预处理器- 8 ^" ^+ r" m' v, G1 x- q. }
/FI 命名强制包含文件 name forced include file
- O3 A1 r# _# U# C/C 不吸取注释 don't strip comments
' k6 {9 ^/ }- I" \6 z; ?9 ^" \+ H2 o% |/U 移除预定义宏 remove predefined macro
- R5 F+ U+ _6 R+ }7 r" z2 a' w/D{=|#} 定义宏 define macro
! q& i" y# |) Y& |1 m9 n& l/u 移除所有预定义宏 remove all predefined macros / w/ |5 X- t' x3 [2 u' A; b
/E 将预处理定向到标准输出 preprocess to stdout # c8 ~, W2 B! L/ U: R
/I 添加到包含文件的搜索路径 add to include search path % }2 _  N' e0 O8 z6 g3 \
/EP 将预处理定向到标准输出,不要带行号 preprocess to stdout, no #line % h  c: l( A1 ~0 p7 M# j
/X 忽略“标准位置” ignore "standard places" % E" s* O9 S. |- u+ [6 Q
/P 预处理到文件 preprocess to file
1 G" E  J4 Z4 \; p6 z" L$ \5 b6 z
-语言- " w2 [# m* K7 t, \4 ^& G: d
/Zi 启用调试信息 enable debugging information 7 n; ]" h- O; \  j% U
/Zl 忽略 .OBJ 中的默认库名 omit default library name in .OBJ / A: P# u3 h/ O3 u
/ZI 启用调试信息的“编辑并继续”功能 enable Edit and Continue debug info 1 d0 |( x0 I! M2 s8 K) l
/Zg 生成函数原型 generate function prototypes
1 o4 r( R9 e- e7 |/Z7 启用旧式调试信息 enable old-style debug info * c# ]2 [  Z: }' z9 r
/Zs 只进行语法检查 syntax check only $ _6 V5 b- D% z" S" ]( P+ m
/Zd 仅要行号调试信息 line number debugging info only ) {6 b* |: t" N# I% d1 z" i5 A
/vd{0|1} 禁用/启用 vtordisp disable/enable vtordisp 7 o" D  G! v( T+ d# v6 a* Y! ?5 i
/Zp[n] 在 n 字节边界上包装结构 pack structs on n-byte boundary " p! Z, M( J- P! I# F
/vm 指向成员的指针类型 type of pointers to members 6 |: |: A- ^7 v' k4 s/ `
/Za 禁用扩展(暗指 /Op) disable extensions (implies /Op)
0 U' |8 Y# h& _& A/noBool 禁用“bool”关键字 disable "bool" keyword
! c+ [) e/ f0 d9 U) y' z! v- j% U- ~/Ze 启用扩展(默认) enable extensions (default) * y" c; W* {$ E0 m. h% z' E4 t
1 A% q8 i1 Y' i* r3 B1 V6 H6 h0 [9 P9 I8 D. D
- 杂项 -
( E* d: s# v( v/ T0 t- B6 s; D# Q/?, /help 打印此帮助消息 print this help message ' C5 R" h7 i8 u. o; N+ T7 d
/c 只编译,不链接 compile only, no link $ ]6 ]. K$ l6 X! U+ e1 v
/W 设置警告等级(默认 n=1) set warning level (default n=1)
2 {1 g; q9 y- S# {$ s8 x% T6 u/H 最大化外部名称长度 max external name length
# r) I7 b! O0 y, `/J 默认 char 类型是 unsigned default char type is unsigned ) V  B# x5 K" h: ]
/nologo 取消显示版权消息 suppress copyright message
. d( b8 k( `# \9 K, N/WX 将警告视为错误 treat warnings as errors $ Y! V' \4 g' R; T$ L2 Q
/Tc 将文件编译为 .c compile file as .c
, Z( ?5 }2 h% p3 Z, \' ^4 V/Yc[file] 创建 .PCH 文件 create .PCH file
* y; R! Q( `$ u, }1 B/Tp 将文件编译为 .cpp compile file as .cpp 9 r3 L7 A+ X! h6 k3 t; L
/Yd 将调试信息放在每个 .OBJ 中 put debug info in every .OBJ : r/ m1 A6 Z! S: k8 C% }# A5 t$ Z! Z
/TC 将所有文件编译为 .c compile all files as .c
. B0 {3 w5 K( L& d& B1 \, O& p' y/TP 将所有文件编译为 .cpp compile all files as .cpp 5 F8 _5 c/ ~3 f
/Yu[file] 使用 .PCH 文件 use .PCH file 7 Z( L4 i) B8 d% e. ]9 s# J! {
/V 设置版本字符串 set version string % S$ y3 G! Z6 n6 A
/YX[file] 自动的 .PCH 文件 automatic .PCH " @9 z3 h' X; c1 Q; [- V2 J* z
/w 禁用所有警告 disable all warnings
4 L3 C% R5 z  U! _/Zm 最大内存分配(默认为 %) max memory alloc (% of default) 6 V7 m; C" `  _0 ]6 S0 g1 Q

: N" U6 }9 d9 W. H-链接-
: o! }2 E! m  D& [/MD 与 MSVCRT.LIB 链接 link with MSVCRT.LIB
# r9 @  k! @2 S/MDd 与 MSVCRTD.LIB 调试库链接 link with MSVCRTD.LIB debug lib
+ x& u. ]) S0 G' c" ]/ML 与 LIBC.LIB 链接 link with LIBC.LIB
7 {4 T# P& [( `1 ~; Y( e* W; Z/MLd 与 LIBCD.LIB 调试库链接 link with LIBCD.LIB debug lib 7 A! K$ [2 k5 n+ Z/ P8 \
/MT 与 LIBCMT.LIB 链接 link with LIBCMT.LIB
# A6 O3 c: F1 ]0 w+ A* l/MTd 与 LIBCMTD.LIB 调试库链接 link with LIBCMTD.LIB debug lib 5 }$ P0 s- q8 S
/LD 创建 .DLL Create .DLL
# p2 m6 l1 }4 g  E. ^# X/F 设置堆栈大小 set stack size # k' T& v; p6 B  G3 E
/LDd 创建 .DLL 调试库 Create .DLL debug libary 2 F2 Q* |/ S$ H8 i3 C1 b
/link [链接器选项和库] [linker options and libraries]
您需要登录后才可以回帖 登录 | 加入计匠网

本版积分规则

Archiver|手机版|小黑屋|计匠网

GMT+8, 2024-5-19 14:31 , Processed in 0.027011 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表