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

[转载]cl的编译参数

[复制链接]
发表于 2009-4-15 15:14:27 | 显示全部楼层 |阅读模式
-优化-
8 L6 P! m. J, }* O/O1 最小化空间 minimize space
+ V5 F; d  O# t7 f5 X- D* K/Op[-] 改善浮点数一致性 improve floating-pt consistency
2 }. w$ ]* [' p/ \3 ?/O2 最大化速度 maximize speed 6 N0 ?) T" q$ B" ^. m9 T" |
/Os 优选代码空间 favor code space & k, c& [& |% @( s6 s
/Oa 假设没有别名 assume no aliasing
# W' _6 h& E9 {6 V, s/Ot 优选代码速度 favor code speed
' Q  Q" b. ]; h1 @- \" K/Ob 内联展开(默认 n=0) inline expansion (default n=0) 5 K4 ~! }2 G5 V" x9 K
/Ow 假设交叉函数别名 assume cross-function aliasing
5 @% G, V7 @* B; I/Od 禁用优化(默认值) disable optimizations (default)
9 @& I; ^# _, S: V- x. U/Ox 最大化选项。(/Ogityb2 /Gs) maximum opts. (/Ogityb1 /Gs)
1 k& ]2 L' i4 s, C0 w( L, f/Og 启用全局优化 enable global optimization 9 s* b3 C+ v) [) E$ G
/Oy[-] 启用框架指针省略 enable frame pointer omission 0 H  ]$ y/ o! l* e2 e6 V
/Oi 启用内建函数 enable intrinsic functions
* y1 ^" H! Q' Q: f7 ~: L+ `: }: w6 a* ]
-代码生成- 1 ~4 z; k* U+ x, x/ m
/G3 为 80386 进行优化 optimize for 80386
* c! r- K; M4 v2 Q/G4 为 80486 进行优化 optimize for 80486
' @' K- p, a( L/ S2 ^2 y/GR[-] 启用 C++ RTTI enable C++ RTTI 3 {; {; R& I* O/ K9 C
/G5 为 Pentium 进行优化 optimize for Pentium
% W4 H0 ]. g6 U9 G/G6 为 Pentium Pro 进行优化 optimize for Pentium Pro - I% e9 h: y( W" v2 ?. |
/GX[-] 启用 C++ 异常处理(与 /EHsc 相同) enable C++ EH (same as /EHsc) % _6 W( [8 A- K# b9 v
/EHs 启用同步 C++ 异常处理 enable synchronous C++ EH ) N5 J  u* D" O4 z8 _" w
/GD 为 Windows DLL 进行优化 optimize for Windows DLL
2 r( A- G0 H3 N: X( n/GB 为混合模型进行优化(默认) optimize for blended model (default)
. M7 g' z- J8 a0 \, ^8 `/EHa 启用异步 C++ 异常处理 enable asynchronous C++ EH ; K  U, b- y/ m# F
/Gd __cdecl 调用约定 __cdecl calling convention
- d* L4 t0 j# k: S# p. n5 p5 }/EHc extern“C”默认为 nothrow extern "C" defaults to nothrow " O9 y4 K& W) J5 C, ~
/Gr __fastcall 调用约定 __fastcall calling convention : D6 {: e0 d* g7 S3 D
/Gi[-] 启用增量编译 enable incremental compilation ( `7 ~5 Y' \( z% {
/Gz __stdcall 调用约定 __stdcall calling convention 8 T' b& J  f3 R( d2 h+ s/ n4 p
/Gm[-] 启用最小重新生成 enable minimal rebuild : P; S& h4 R$ w/ p& Q* i) S
/GA 为 Windows 应用程序进行优化 optimize for Windows Application 5 k3 g& }% P  l' `: I
/Gf 启用字符串池 enable string pooling
  g$ S  [! b' o2 o; S, \/QIfdiv[-] 启用 Pentium FDIV 修复 enable Pentium FDIV fix ; ?# R7 I4 k, K) M5 [- f& i
/GF 启用只读字符串池 enable read-only string pooling : L; n- J% k5 q
/QI0f[-] 启用 Pentium 0x0f 修复 enable Pentium 0x0f fix 2 ~( a1 e) m* J
/Gy 分隔链接器函数 separate functions for linker
+ e8 ?# s9 R9 _6 x7 M/GZ 启用运行时调试检查 enable runtime debug checks
3 }8 |6 f, ~; g9 H; d( v/Gh 启用钩子函数调用 enable hook function call
6 D( F: o' K* x/Ge 对所有函数强制堆栈检查 force stack checking for all funcs
1 @; E8 }6 w2 V* f. ^' c' v% c: H/Gs[num] 禁用堆栈检查调用 disable stack checking calls
2 K9 g# V7 H  d1 M/ E2 X1 e) S% U0 Y4 K$ G- I' s: p. w! B. m
-输出文件- , ^2 w& j8 U5 C+ [& T: s* c0 @6 O) }
/Fa[file] 命名程序集列表文件 name assembly listing file $ ]! E/ I0 e$ N7 Z9 ^7 u5 w  f6 U
/Fo 命名对象文件 name object file
* }- r! h" r6 P" n4 x/FA[sc] 配置程序集列表 configure assembly listing $ O" f- X2 W5 q% e' C/ ~/ \
/Fp 命名预编译头文件 name precompiled header file
/ S: s" C; K" n; P8 k/Fd[file] 命名 .PDB 文件 name .PDB file
5 _% B7 k* t6 k6 |& q) n( ~) \% T0 Q/Fr[file] 命名源浏览器文件 name source browser file , D; P7 w) n+ S( }* l$ d7 n1 O
/Fe 命名可执行文件 name executable file
' h  h# h6 q. p4 `# n/FR[file] 命名扩展 .SBR 文件 name extended .SBR file 5 [; g% b4 l- S( g$ I$ @
/Fm[file] 命名映射文件 name map file
0 H. M* H2 w! f- J4 o) j: p; w7 X/ u4 u% j! L. b
-预处理器-
1 b5 c+ p4 Z7 `: |! x, L/FI 命名强制包含文件 name forced include file
: a; u/ Y7 y! H4 Z/C 不吸取注释 don't strip comments
- n- R4 `# B: c, k/ |4 q) C/U 移除预定义宏 remove predefined macro
1 U( U' e6 _* }# b" T3 V, ~/D{=|#} 定义宏 define macro 6 K" j7 R3 Z& h. w" H
/u 移除所有预定义宏 remove all predefined macros 7 m/ |* [7 q5 J, ]1 f
/E 将预处理定向到标准输出 preprocess to stdout
( [' D- U! c6 @, H! r" n. `/I 添加到包含文件的搜索路径 add to include search path / ?! ]9 o) {& x3 H; Z5 Z" V
/EP 将预处理定向到标准输出,不要带行号 preprocess to stdout, no #line 9 g- G# Y0 t. g! c, ^
/X 忽略“标准位置” ignore "standard places" ' [& |! `1 }. c7 C+ g7 \
/P 预处理到文件 preprocess to file - j: \2 G  C( ^) _, G
) @8 s# ]; s( H. m7 h- \: q+ p
-语言- ! {& i1 i% R, Q
/Zi 启用调试信息 enable debugging information - ~& {) N: c% n! q; d0 M3 j6 {
/Zl 忽略 .OBJ 中的默认库名 omit default library name in .OBJ * E1 r, Y( a" ?/ a' `' c2 D6 z
/ZI 启用调试信息的“编辑并继续”功能 enable Edit and Continue debug info 0 \  C0 ?! j4 G1 \" i) L1 j6 ~
/Zg 生成函数原型 generate function prototypes
4 Z# A* @% b. Y; A! X9 O/Z7 启用旧式调试信息 enable old-style debug info . {+ P: R' G  J# R" o
/Zs 只进行语法检查 syntax check only ( W6 W  M8 {6 j/ P
/Zd 仅要行号调试信息 line number debugging info only
% y* s& R% V1 }4 T" w7 G% f2 c7 l/vd{0|1} 禁用/启用 vtordisp disable/enable vtordisp 6 Y- ~: ?/ b3 Z" |6 p: A
/Zp[n] 在 n 字节边界上包装结构 pack structs on n-byte boundary
9 p  J1 N1 V" |2 @7 C: y  D: D/vm 指向成员的指针类型 type of pointers to members / ~4 R: _" c, E% M+ i
/Za 禁用扩展(暗指 /Op) disable extensions (implies /Op)
0 ^/ k0 _- o8 |4 [1 Z" h/noBool 禁用“bool”关键字 disable "bool" keyword   K% c2 Q0 C5 h! {" b
/Ze 启用扩展(默认) enable extensions (default)
9 x% N9 m) [% |0 B
8 e- ^8 @3 }7 ^" m3 C! W; d- 杂项 -
+ ~+ ^. E7 D8 C- ?* D7 ^+ c8 }( s/?, /help 打印此帮助消息 print this help message 2 `, F/ B7 h1 D) o- Z
/c 只编译,不链接 compile only, no link 6 E0 }' B: b0 j9 r0 i7 z: @
/W 设置警告等级(默认 n=1) set warning level (default n=1)
1 O, ]' r- I$ J9 ~/H 最大化外部名称长度 max external name length 8 \* E+ x4 E: _: Y
/J 默认 char 类型是 unsigned default char type is unsigned
8 {- [% w9 u! J- s5 {- |3 Y/ T, }  q/nologo 取消显示版权消息 suppress copyright message
) X$ ]) U! z9 x/WX 将警告视为错误 treat warnings as errors
; ~2 ~' L. Z! j; p6 q6 j. Y/Tc 将文件编译为 .c compile file as .c ! u# Z  _0 E: k8 n0 ^, K5 o
/Yc[file] 创建 .PCH 文件 create .PCH file ( z1 E8 |  ?9 r/ z) {$ d
/Tp 将文件编译为 .cpp compile file as .cpp
. X0 @  r) y& ?" J+ N8 |) q0 ^1 ?! b/Yd 将调试信息放在每个 .OBJ 中 put debug info in every .OBJ
! C1 H6 ^5 W4 m- D1 R/TC 将所有文件编译为 .c compile all files as .c
$ B7 Q/ E/ g9 Y/ M/TP 将所有文件编译为 .cpp compile all files as .cpp : W* D- E& U2 ^$ C) Y5 x% J
/Yu[file] 使用 .PCH 文件 use .PCH file ( M5 D& n6 \' K$ ]" ?7 V
/V 设置版本字符串 set version string ! e/ ]4 k7 ^/ e! ^$ O
/YX[file] 自动的 .PCH 文件 automatic .PCH ! v9 l/ R% w% \
/w 禁用所有警告 disable all warnings ) T1 l0 i( E" G% Q( {
/Zm 最大内存分配(默认为 %) max memory alloc (% of default) ' f0 I- E7 l8 v# r( [5 Y( T+ e6 u
4 A1 p5 ^' J, X/ K
-链接- / W; c' J1 K, y* w* j
/MD 与 MSVCRT.LIB 链接 link with MSVCRT.LIB
$ V5 ~8 s3 H  O9 R8 u1 Z6 |' w/MDd 与 MSVCRTD.LIB 调试库链接 link with MSVCRTD.LIB debug lib ' g" `9 L4 W: Q1 _  `6 D6 x
/ML 与 LIBC.LIB 链接 link with LIBC.LIB 6 N- e6 q# |0 q8 Q/ h3 Z/ T
/MLd 与 LIBCD.LIB 调试库链接 link with LIBCD.LIB debug lib 7 ~! O. x$ u; q' |$ [
/MT 与 LIBCMT.LIB 链接 link with LIBCMT.LIB
* A) ~! q" P9 J8 @" ^$ [; K/MTd 与 LIBCMTD.LIB 调试库链接 link with LIBCMTD.LIB debug lib
" _# W3 z6 [) @& ?5 X/LD 创建 .DLL Create .DLL
5 c/ D# l3 [" ~7 Z/F 设置堆栈大小 set stack size + ]& d: N6 ^0 S6 L4 @  B  X3 R
/LDd 创建 .DLL 调试库 Create .DLL debug libary
" N3 m4 p. \7 H  \, l. v/link [链接器选项和库] [linker options and libraries]
您需要登录后才可以回帖 登录 | 加入计匠网

本版积分规则

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

GMT+8, 2024-5-20 07:32 , Processed in 0.016576 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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