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

[转载]cl的编译参数

[复制链接]
发表于 2009-4-15 15:14:27 | 显示全部楼层 |阅读模式
-优化-4 P) v  V% X' A" U9 W
/O1 最小化空间 minimize space
- Z% ^0 R& H& h  l/ c: G, S/Op[-] 改善浮点数一致性 improve floating-pt consistency
. C/ w2 G3 n% B, k9 H* e" v/O2 最大化速度 maximize speed
; U( q4 u9 a# a- P) z/Os 优选代码空间 favor code space
2 C$ h+ k! f) n5 o1 p/ ^/Oa 假设没有别名 assume no aliasing
" p. x" p! P, f3 K2 ^" V/ X( f/Ot 优选代码速度 favor code speed ; [) T- i" X. O+ {% ~; G' @; H
/Ob 内联展开(默认 n=0) inline expansion (default n=0)
* T  S( v) B- P0 ]+ F( Q& Y/Ow 假设交叉函数别名 assume cross-function aliasing
( ^6 T0 H" H) f5 X/Od 禁用优化(默认值) disable optimizations (default)
5 ~: i6 L8 l5 _9 p4 s5 j/Ox 最大化选项。(/Ogityb2 /Gs) maximum opts. (/Ogityb1 /Gs) ) ^6 N) ~6 Z: N* ^& x8 E6 L
/Og 启用全局优化 enable global optimization # ?. S/ S7 `2 E1 \2 b6 F' t
/Oy[-] 启用框架指针省略 enable frame pointer omission ( e$ G4 H7 \4 I0 y7 @: X  u- i. U
/Oi 启用内建函数 enable intrinsic functions
/ W& _, ?" P  P  G. S  I- g6 _
9 C+ z" O( r: Z( D-代码生成- & `/ E. b! C3 `. |, d
/G3 为 80386 进行优化 optimize for 80386 $ \& j' U+ f# E& D
/G4 为 80486 进行优化 optimize for 80486
4 P2 L$ f( G( \& ?! J# M. {/GR[-] 启用 C++ RTTI enable C++ RTTI
! \3 J- n' a+ u  B2 f/G5 为 Pentium 进行优化 optimize for Pentium
7 d2 I- _. \- _8 n6 Z. N- }$ z' d# k/G6 为 Pentium Pro 进行优化 optimize for Pentium Pro
# L9 F# G$ s; f/GX[-] 启用 C++ 异常处理(与 /EHsc 相同) enable C++ EH (same as /EHsc) + M# C  I: T; ^7 [. ~  [' c+ `, x
/EHs 启用同步 C++ 异常处理 enable synchronous C++ EH
" R8 \& H, \2 s/GD 为 Windows DLL 进行优化 optimize for Windows DLL
, f8 a, A& [+ q( [2 \& d2 o4 u/GB 为混合模型进行优化(默认) optimize for blended model (default) - |# \5 Y3 |" m& ?4 V  v' W* J
/EHa 启用异步 C++ 异常处理 enable asynchronous C++ EH   C* f7 {5 [8 x: {: G& F
/Gd __cdecl 调用约定 __cdecl calling convention 5 {$ A! x$ Z6 W
/EHc extern“C”默认为 nothrow extern "C" defaults to nothrow & R( M3 y" I  q6 l. g
/Gr __fastcall 调用约定 __fastcall calling convention $ q0 c( g2 B1 i% o- F5 ^* g
/Gi[-] 启用增量编译 enable incremental compilation
& h0 J$ n& j5 E0 ~4 h& q/Gz __stdcall 调用约定 __stdcall calling convention
0 b, E' f" n2 i( G$ ?+ I  Q' I/Gm[-] 启用最小重新生成 enable minimal rebuild
6 ^5 }5 j0 s0 [$ G/GA 为 Windows 应用程序进行优化 optimize for Windows Application
- Z6 k  K$ a! I) O7 A/ C6 l  P$ u: s/Gf 启用字符串池 enable string pooling
; h: d# |* S% F& }) M/QIfdiv[-] 启用 Pentium FDIV 修复 enable Pentium FDIV fix 8 Q: o/ T" Z! l5 D4 r
/GF 启用只读字符串池 enable read-only string pooling
/ L( ^7 O* f. w6 H/QI0f[-] 启用 Pentium 0x0f 修复 enable Pentium 0x0f fix 8 H7 W& a# e6 M0 V" m
/Gy 分隔链接器函数 separate functions for linker . X; H* E7 [8 z. U
/GZ 启用运行时调试检查 enable runtime debug checks # C" {& O! \, B$ r
/Gh 启用钩子函数调用 enable hook function call
7 E1 [! d9 z6 y( R" R/Ge 对所有函数强制堆栈检查 force stack checking for all funcs 3 N* W  w9 P$ O5 s' w% A
/Gs[num] 禁用堆栈检查调用 disable stack checking calls ; b: J; k4 @! W8 K+ b

- L( G! i8 R4 g9 d. d/ V0 F-输出文件-
9 G3 l: \9 `, C! Z; Q/Fa[file] 命名程序集列表文件 name assembly listing file
4 g% h: U% J; v& d( a/Fo 命名对象文件 name object file
6 e7 d* I+ R* X3 K/FA[sc] 配置程序集列表 configure assembly listing ; W% S% f, b. D5 q4 V
/Fp 命名预编译头文件 name precompiled header file
& B& L# k3 ^& c, |9 w% h/Fd[file] 命名 .PDB 文件 name .PDB file # `0 a0 k# y! s6 _+ W% |
/Fr[file] 命名源浏览器文件 name source browser file
; S& A1 I1 Q: }8 ], r2 [, T/Fe 命名可执行文件 name executable file
9 \! h9 ~6 d# Y( L/FR[file] 命名扩展 .SBR 文件 name extended .SBR file 8 B( c1 }# n( u) h
/Fm[file] 命名映射文件 name map file
# ]6 B1 \( ]4 B* C. d
% ]- h" @0 Z  }* \) p0 `-预处理器-
& u" n. s0 q& r0 e! |5 y$ D, Q/FI 命名强制包含文件 name forced include file
4 `2 G" |0 W) H( Y5 m/C 不吸取注释 don't strip comments & C/ y% l. y  R6 e1 I
/U 移除预定义宏 remove predefined macro
& l/ R+ Z" {2 L. i$ |. V/D{=|#} 定义宏 define macro . u2 k/ L. k, B! H/ J
/u 移除所有预定义宏 remove all predefined macros
8 P+ k* t) r  T7 \9 _/E 将预处理定向到标准输出 preprocess to stdout
) z. v4 {+ S' t: L/ W* K6 N/I 添加到包含文件的搜索路径 add to include search path ' d  V5 H2 c3 p& N1 }
/EP 将预处理定向到标准输出,不要带行号 preprocess to stdout, no #line
0 x4 ]! Y9 K8 \% `$ J6 K+ X/X 忽略“标准位置” ignore "standard places"
/ e' p7 J, L, v7 F/P 预处理到文件 preprocess to file
2 B+ K: f7 L  B( S1 c6 u6 q
" f: x+ B0 i4 B8 ]( i( Q+ \-语言-
  r6 u7 P4 W; R. G3 ]/Zi 启用调试信息 enable debugging information
& y$ ^# a; O9 ^6 G7 N/Zl 忽略 .OBJ 中的默认库名 omit default library name in .OBJ : U& w* u8 t# p# y. v
/ZI 启用调试信息的“编辑并继续”功能 enable Edit and Continue debug info ) }5 z4 k; F; w  A0 ^5 |
/Zg 生成函数原型 generate function prototypes ! D) |! k7 r6 V1 ~* A8 d& k, ^
/Z7 启用旧式调试信息 enable old-style debug info ; M: l3 `  n' M
/Zs 只进行语法检查 syntax check only
0 M  m) s: B) s& q/Zd 仅要行号调试信息 line number debugging info only / \. W" L, G; |5 D4 ~% i) J
/vd{0|1} 禁用/启用 vtordisp disable/enable vtordisp
1 \3 B5 T% f; b; [9 n/Zp[n] 在 n 字节边界上包装结构 pack structs on n-byte boundary 3 I8 j. t# w! ?( V' `
/vm 指向成员的指针类型 type of pointers to members * D/ {& Y/ g. a6 B" A
/Za 禁用扩展(暗指 /Op) disable extensions (implies /Op)
, H1 R3 B- v* k1 z8 L/noBool 禁用“bool”关键字 disable "bool" keyword & O, V4 n$ o3 G5 J1 ^2 d" N6 N
/Ze 启用扩展(默认) enable extensions (default)
. j0 G- U, Q9 l$ H* Y# W
# N, d/ \0 d1 H% H- 杂项 - 5 h$ f- W8 I3 z: n" }
/?, /help 打印此帮助消息 print this help message
1 l  S) Y  x% ^9 W& Z) P/c 只编译,不链接 compile only, no link
& P; }; g: M" x' |/W 设置警告等级(默认 n=1) set warning level (default n=1) ; y# E, x$ H% w- A
/H 最大化外部名称长度 max external name length $ z+ b8 O7 L( I6 i$ h
/J 默认 char 类型是 unsigned default char type is unsigned , Q7 s" w( i0 }$ X) S/ m9 Q
/nologo 取消显示版权消息 suppress copyright message 9 s# W4 E2 X0 s! t- j8 t6 M
/WX 将警告视为错误 treat warnings as errors
: [) F( x& P8 w/Tc 将文件编译为 .c compile file as .c : E* j% z: j: t+ V- ^
/Yc[file] 创建 .PCH 文件 create .PCH file
% A4 b: I: ~" k1 E- o7 j4 D/Tp 将文件编译为 .cpp compile file as .cpp
' |5 _" Z  @! V  i- p5 V5 Y8 t/Yd 将调试信息放在每个 .OBJ 中 put debug info in every .OBJ
" U; z4 {' I5 l8 W! V; D3 o/TC 将所有文件编译为 .c compile all files as .c
4 R; V$ s: c2 M/TP 将所有文件编译为 .cpp compile all files as .cpp 2 U+ i! z  A7 v' l/ y: s
/Yu[file] 使用 .PCH 文件 use .PCH file 1 |4 @" u( l, l& o9 ?9 e
/V 设置版本字符串 set version string * j9 V* I: l8 ]
/YX[file] 自动的 .PCH 文件 automatic .PCH
$ t. T- _$ D, M  j$ _/w 禁用所有警告 disable all warnings
- V# w; k" J( r/Zm 最大内存分配(默认为 %) max memory alloc (% of default) $ @. N% o# u3 f* Z. j! r7 q- g

7 B7 l; E% z* n# M% J- {; ^9 q-链接-
+ g2 x1 r: H% [- x* L% |/MD 与 MSVCRT.LIB 链接 link with MSVCRT.LIB
! s! i0 a& o0 z0 z7 b: N( r$ e/MDd 与 MSVCRTD.LIB 调试库链接 link with MSVCRTD.LIB debug lib
0 M$ o0 o0 {- t: p, k9 t+ j/ML 与 LIBC.LIB 链接 link with LIBC.LIB
. _( r. \0 \2 r/ u5 x/MLd 与 LIBCD.LIB 调试库链接 link with LIBCD.LIB debug lib . f* j+ |4 x! Q8 K9 i6 h
/MT 与 LIBCMT.LIB 链接 link with LIBCMT.LIB ; E. a) w/ o9 L+ u, e7 O" m
/MTd 与 LIBCMTD.LIB 调试库链接 link with LIBCMTD.LIB debug lib
" p) Y7 V" F/ K4 L/LD 创建 .DLL Create .DLL ) K" ?: ]8 ~/ y* Y* Y& e/ w
/F 设置堆栈大小 set stack size
7 Q0 A% g! `* a, Q0 q/LDd 创建 .DLL 调试库 Create .DLL debug libary # t4 n/ K+ n. A# u+ h
/link [链接器选项和库] [linker options and libraries]
您需要登录后才可以回帖 登录 | 加入计匠网

本版积分规则

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

GMT+8, 2026-6-8 07:07 , Processed in 0.425057 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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