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

[转载]cl的编译参数

[复制链接]
发表于 2009-4-15 15:14:27 | 显示全部楼层 |阅读模式
-优化-
' _5 ]6 l  U3 h0 H* f, Z/O1 最小化空间 minimize space
7 m) q+ k" p# X* W/Op[-] 改善浮点数一致性 improve floating-pt consistency
/ ~1 n+ H+ O# |! ?6 O# q8 v" \2 N( S/O2 最大化速度 maximize speed
9 h) W( x# t' A2 i5 Z/Os 优选代码空间 favor code space
1 D1 c, V  u$ x9 {8 E5 J/Oa 假设没有别名 assume no aliasing ! v+ X/ Y# h4 ^4 Z! p
/Ot 优选代码速度 favor code speed " f! ?- {; X% v! D  o" \
/Ob 内联展开(默认 n=0) inline expansion (default n=0)
, _  U$ a& m, [; U/Ow 假设交叉函数别名 assume cross-function aliasing / n! _- {; y% v+ B% J' q! z, j$ \
/Od 禁用优化(默认值) disable optimizations (default)
, ^6 c; G% x* `5 g/Ox 最大化选项。(/Ogityb2 /Gs) maximum opts. (/Ogityb1 /Gs) & N2 B' M+ `: h: l! E- w
/Og 启用全局优化 enable global optimization - J* J1 W1 h0 P1 q% U
/Oy[-] 启用框架指针省略 enable frame pointer omission
0 w# ?# |; B$ M6 S; |5 Z2 j/Oi 启用内建函数 enable intrinsic functions
/ @+ t! q2 u+ D
% n1 h. z$ S6 {# K  x8 g-代码生成-
, `/ [: G; `1 T* E4 C3 D# V2 b# O/G3 为 80386 进行优化 optimize for 80386
/ C+ G. `: |5 v0 T, ?5 G/G4 为 80486 进行优化 optimize for 80486 4 {) v& p% I0 N' j3 d7 M, e6 E
/GR[-] 启用 C++ RTTI enable C++ RTTI
( x  l8 U% f' s! o/G5 为 Pentium 进行优化 optimize for Pentium
1 ^. p1 K( `  O% \/G6 为 Pentium Pro 进行优化 optimize for Pentium Pro " X9 L8 O# Y  L  r) z% D3 ]: T% s! E
/GX[-] 启用 C++ 异常处理(与 /EHsc 相同) enable C++ EH (same as /EHsc)
/ [4 g1 C) {- D3 k  ]- T0 t/EHs 启用同步 C++ 异常处理 enable synchronous C++ EH - z$ I+ C2 y" U+ r% M3 O/ W0 t
/GD 为 Windows DLL 进行优化 optimize for Windows DLL
3 j5 y# ~5 ~7 w/GB 为混合模型进行优化(默认) optimize for blended model (default)
1 P1 _* Z+ I2 j( p/EHa 启用异步 C++ 异常处理 enable asynchronous C++ EH
, b2 C8 J& c' C0 R+ M  p9 z/Gd __cdecl 调用约定 __cdecl calling convention : a' M: r2 m0 Q( |) o. v& q+ i
/EHc extern“C”默认为 nothrow extern "C" defaults to nothrow 7 V# U! R" J( _- P
/Gr __fastcall 调用约定 __fastcall calling convention / i1 X, O% T& D6 M( ~+ {3 [! B! H- J
/Gi[-] 启用增量编译 enable incremental compilation
, s  T6 y2 U; Y/Gz __stdcall 调用约定 __stdcall calling convention $ C: A9 l6 c( l
/Gm[-] 启用最小重新生成 enable minimal rebuild % J' e( k/ N! \$ E; I. U
/GA 为 Windows 应用程序进行优化 optimize for Windows Application
& j9 a& \2 A0 ~0 e/Gf 启用字符串池 enable string pooling
8 S) [( o  S6 w4 P9 r/QIfdiv[-] 启用 Pentium FDIV 修复 enable Pentium FDIV fix . ?  g+ B; v) I
/GF 启用只读字符串池 enable read-only string pooling
" q/ l/ F2 W8 w9 ?4 z/ t0 k/QI0f[-] 启用 Pentium 0x0f 修复 enable Pentium 0x0f fix " Y3 k, A) R" d7 @8 s0 d( p6 t
/Gy 分隔链接器函数 separate functions for linker
. M$ J- O" `; ?( F/GZ 启用运行时调试检查 enable runtime debug checks
# V' Y& k& m* j+ h* i0 i/Gh 启用钩子函数调用 enable hook function call
5 w# b$ y. ?3 |: S: @/Ge 对所有函数强制堆栈检查 force stack checking for all funcs
/ m, R5 c& w! q0 T5 f/Gs[num] 禁用堆栈检查调用 disable stack checking calls 6 M. c1 _, G/ V& u

" K- G" f5 k1 X9 u0 r. ~9 x) f-输出文件-
# K0 v, t; `5 N6 j3 W& h, Z/Fa[file] 命名程序集列表文件 name assembly listing file
7 {, M4 C% j9 [/Fo 命名对象文件 name object file 1 {6 ~* s9 t( P+ N0 ^
/FA[sc] 配置程序集列表 configure assembly listing ( x: e; Y3 o% E6 z0 U! D
/Fp 命名预编译头文件 name precompiled header file
- b0 o; Q% A( _5 Y% Y0 z; s/Fd[file] 命名 .PDB 文件 name .PDB file
& F2 q3 O  }: W- n3 ?0 M/Fr[file] 命名源浏览器文件 name source browser file & b) s: g& y- t4 P8 M1 L7 s% P* ~
/Fe 命名可执行文件 name executable file ' j/ i- x) y* w
/FR[file] 命名扩展 .SBR 文件 name extended .SBR file : a" F3 F) r/ @  B  C. t) m- ], f
/Fm[file] 命名映射文件 name map file 4 Y5 \3 @7 z2 P/ j' P( ^
% D, X: u0 L4 ?
-预处理器- ! ?% m& g! S) }' j
/FI 命名强制包含文件 name forced include file $ D6 w0 ]+ m. z& V, R: B
/C 不吸取注释 don't strip comments $ ^( {; v; N" k( N
/U 移除预定义宏 remove predefined macro : z' }& _' `! d! S5 Y
/D{=|#} 定义宏 define macro - s4 A5 V: D3 i; @( V: W
/u 移除所有预定义宏 remove all predefined macros 5 B, f$ ~) c+ ^9 \
/E 将预处理定向到标准输出 preprocess to stdout
! q" i6 Z1 l' w/I 添加到包含文件的搜索路径 add to include search path ; V$ M* H2 X8 |- f' H. E
/EP 将预处理定向到标准输出,不要带行号 preprocess to stdout, no #line 7 N2 s6 m& H4 Q: i: T3 Q
/X 忽略“标准位置” ignore "standard places" 9 h1 ^& N" C" k! z$ {
/P 预处理到文件 preprocess to file / q0 F3 w2 L+ _

% \' n& ?9 i  V1 z3 j: S* x-语言-
' }. f+ i3 c5 F( n4 J/Zi 启用调试信息 enable debugging information + a. B5 V7 v* N4 A
/Zl 忽略 .OBJ 中的默认库名 omit default library name in .OBJ . P& o2 f  F; D3 \- x3 {
/ZI 启用调试信息的“编辑并继续”功能 enable Edit and Continue debug info . A: I0 B1 @$ J6 |
/Zg 生成函数原型 generate function prototypes
, I9 _. p; S. q: N; ^$ W: u/Z7 启用旧式调试信息 enable old-style debug info . x: x$ z& M' G( f4 y  o
/Zs 只进行语法检查 syntax check only
  M$ B' U) j' W1 Q5 |' H/Zd 仅要行号调试信息 line number debugging info only
3 S% ~% a' s# n5 J( h2 p) H! D/vd{0|1} 禁用/启用 vtordisp disable/enable vtordisp
9 a' f" G% a$ I* p. ~. \2 K/Zp[n] 在 n 字节边界上包装结构 pack structs on n-byte boundary
: b- I1 I" r( ?7 i. G2 p2 C/vm 指向成员的指针类型 type of pointers to members
! H" `$ p# d  u0 _# D9 [8 Q( A/Za 禁用扩展(暗指 /Op) disable extensions (implies /Op) 9 C) o/ y9 J$ E
/noBool 禁用“bool”关键字 disable "bool" keyword $ |+ l2 S0 p' ~3 F
/Ze 启用扩展(默认) enable extensions (default)
; j* k0 n7 y6 {- m1 p; ?
- A1 l/ i' C2 o  ?$ h- 杂项 - 5 p6 E# o6 f- k# n4 ?- w* _
/?, /help 打印此帮助消息 print this help message
5 ]. e/ i+ i' K1 B/c 只编译,不链接 compile only, no link / H. j7 f/ i9 B' `/ s/ S6 `
/W 设置警告等级(默认 n=1) set warning level (default n=1) 8 g; e% e$ y+ T3 b
/H 最大化外部名称长度 max external name length ; T% n# y+ I" G
/J 默认 char 类型是 unsigned default char type is unsigned : j% l9 e$ j- E$ f' F: f9 }
/nologo 取消显示版权消息 suppress copyright message - B8 r) r! r, u# h
/WX 将警告视为错误 treat warnings as errors
# o/ }) D. e7 E  F6 H/Tc 将文件编译为 .c compile file as .c
7 d/ p2 V: u. m  a) J4 v/Yc[file] 创建 .PCH 文件 create .PCH file
( R) O+ g) [$ M& ?  \$ a# }/Tp 将文件编译为 .cpp compile file as .cpp 9 c  e& k- W6 V, M4 l6 x& K
/Yd 将调试信息放在每个 .OBJ 中 put debug info in every .OBJ
6 B& w" b, E8 G  R) s/TC 将所有文件编译为 .c compile all files as .c
7 k# V8 B4 D# h1 d( G/TP 将所有文件编译为 .cpp compile all files as .cpp
9 L2 a0 R4 r0 `- \. I/Yu[file] 使用 .PCH 文件 use .PCH file 7 x' q, b, A- R3 b
/V 设置版本字符串 set version string
0 c" t3 E% r7 X: U8 w# R: X9 m/YX[file] 自动的 .PCH 文件 automatic .PCH . w2 M( `2 |9 k1 F6 Y
/w 禁用所有警告 disable all warnings
$ i8 \. G  ?- c/ w% C/Zm 最大内存分配(默认为 %) max memory alloc (% of default) / `$ `6 H' D0 \; v" |
/ k3 s3 @3 _, h' P8 I4 D' q6 d) Y/ E
-链接- ) \! i2 p9 z  ~$ Z  P/ b. k
/MD 与 MSVCRT.LIB 链接 link with MSVCRT.LIB 8 M6 t- L& N9 r; \) `
/MDd 与 MSVCRTD.LIB 调试库链接 link with MSVCRTD.LIB debug lib
: o. r% n+ B. v0 g+ m/ML 与 LIBC.LIB 链接 link with LIBC.LIB
7 l: A2 ?  L+ f) E6 h" |5 p# f8 `" V/MLd 与 LIBCD.LIB 调试库链接 link with LIBCD.LIB debug lib   X+ y; {6 B( ^7 G$ V! V
/MT 与 LIBCMT.LIB 链接 link with LIBCMT.LIB
4 I8 M2 ]& Q2 }2 P/ t/MTd 与 LIBCMTD.LIB 调试库链接 link with LIBCMTD.LIB debug lib
7 a: ?" l- ~0 r, Z/LD 创建 .DLL Create .DLL * m% M7 s" j6 Z; s
/F 设置堆栈大小 set stack size 6 [' P% T6 R, m9 w: g
/LDd 创建 .DLL 调试库 Create .DLL debug libary
/ c4 T- V6 i0 P+ q/link [链接器选项和库] [linker options and libraries]
您需要登录后才可以回帖 登录 | 加入计匠网

本版积分规则

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

GMT+8, 2026-10-20 10:23 , Processed in 0.185276 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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