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

[转载]cl的编译参数

[复制链接]
发表于 2009-4-15 15:14:27 | 显示全部楼层 |阅读模式
-优化-, n* e* g4 C/ B, H8 {+ R7 L2 b
/O1 最小化空间 minimize space : |: L! y4 h/ d3 l
/Op[-] 改善浮点数一致性 improve floating-pt consistency 3 ?: x, h) M- g5 ?
/O2 最大化速度 maximize speed
0 C+ @" r. B( e/Os 优选代码空间 favor code space - f/ N+ W1 n' Y, [5 K$ r
/Oa 假设没有别名 assume no aliasing
  r7 D9 ~; V* R* n- A; r8 ^. s1 o/Ot 优选代码速度 favor code speed
7 f: e  e8 {1 n$ ^$ ~) \. H/Ob 内联展开(默认 n=0) inline expansion (default n=0) ) R- u: _. S0 E* g6 D/ I
/Ow 假设交叉函数别名 assume cross-function aliasing
+ I4 V) R0 Q. f/Od 禁用优化(默认值) disable optimizations (default) % p( i; g8 [2 ]. L
/Ox 最大化选项。(/Ogityb2 /Gs) maximum opts. (/Ogityb1 /Gs)
8 Q7 A3 |8 ?8 v$ ~/Og 启用全局优化 enable global optimization
3 I9 X2 I0 s. d) [/ v( F' W/Oy[-] 启用框架指针省略 enable frame pointer omission / D' N# w7 E+ ?/ d  a) e
/Oi 启用内建函数 enable intrinsic functions
# Q/ x. C8 B9 ?# `
$ h" x* y! S5 ?: A' ~9 J-代码生成- * R" ?0 q! G$ T& x
/G3 为 80386 进行优化 optimize for 80386 / v" V, S0 A+ Y, A+ {
/G4 为 80486 进行优化 optimize for 80486 ( P& |1 Y4 K' K+ R
/GR[-] 启用 C++ RTTI enable C++ RTTI 9 {& t0 E7 H  c1 K& s
/G5 为 Pentium 进行优化 optimize for Pentium 8 ?; P' \8 S1 M& ~, D9 S
/G6 为 Pentium Pro 进行优化 optimize for Pentium Pro
4 x/ k6 o) G, B1 c) X4 L3 X" |/GX[-] 启用 C++ 异常处理(与 /EHsc 相同) enable C++ EH (same as /EHsc) 8 l: F. J, l3 s* P
/EHs 启用同步 C++ 异常处理 enable synchronous C++ EH " W) [% K4 \1 J- H/ K2 h6 A+ N
/GD 为 Windows DLL 进行优化 optimize for Windows DLL
  c" ], L" h( q# G, k3 |/GB 为混合模型进行优化(默认) optimize for blended model (default)
! s. e+ u  Z/ ^2 p/ v/EHa 启用异步 C++ 异常处理 enable asynchronous C++ EH 8 R% c  F; }+ v% Q
/Gd __cdecl 调用约定 __cdecl calling convention % O" c3 a) s; q+ o5 J
/EHc extern“C”默认为 nothrow extern "C" defaults to nothrow
; P9 R+ q; y7 @/Gr __fastcall 调用约定 __fastcall calling convention
2 z8 Z# g' }2 o* _/Gi[-] 启用增量编译 enable incremental compilation + N7 H7 _7 h. g8 D% U5 @4 X7 X
/Gz __stdcall 调用约定 __stdcall calling convention 5 K6 t5 j8 p* D/ T4 O
/Gm[-] 启用最小重新生成 enable minimal rebuild
0 a/ t( b: Q# |* y8 h- Q/GA 为 Windows 应用程序进行优化 optimize for Windows Application 9 m8 @7 e9 [1 n
/Gf 启用字符串池 enable string pooling
. I" A: A. r& ^6 x0 V1 Q3 m/QIfdiv[-] 启用 Pentium FDIV 修复 enable Pentium FDIV fix 0 }& G4 S% D; }" O+ c# _$ b- o7 f6 i
/GF 启用只读字符串池 enable read-only string pooling
& L  R  D5 q! d% Z/ w- S/QI0f[-] 启用 Pentium 0x0f 修复 enable Pentium 0x0f fix
6 R1 Q  a0 E" E. V/ c5 _- h, ~/Gy 分隔链接器函数 separate functions for linker 3 c- ~+ }  g$ G+ J% m! y
/GZ 启用运行时调试检查 enable runtime debug checks
2 s# H# D0 z2 d9 A/Gh 启用钩子函数调用 enable hook function call
" d/ T" k; j9 e- L/Ge 对所有函数强制堆栈检查 force stack checking for all funcs ( |3 I! f" w( x$ E  V+ s
/Gs[num] 禁用堆栈检查调用 disable stack checking calls
: E* L& t0 y2 e, q: t* @, L% ^8 ]! r; F
-输出文件-
! C2 n5 |8 ^3 v1 z0 z/Fa[file] 命名程序集列表文件 name assembly listing file
0 W. U) J& c7 u* n; A/ i- m; ]/Fo 命名对象文件 name object file , I7 U. t: K1 w$ w+ ^9 Y/ {
/FA[sc] 配置程序集列表 configure assembly listing
6 A% ~+ x8 F- C$ l  [$ {/Fp 命名预编译头文件 name precompiled header file
. x$ a, n) b6 X/Fd[file] 命名 .PDB 文件 name .PDB file
  e5 d4 O: u3 j/ J& O  F  x0 c/Fr[file] 命名源浏览器文件 name source browser file 1 P% h8 i( U  {* g/ a  E! A
/Fe 命名可执行文件 name executable file ! W% T; z/ }2 n: |/ |, n  }
/FR[file] 命名扩展 .SBR 文件 name extended .SBR file
0 ~# ]# p; C6 i- O+ X/Fm[file] 命名映射文件 name map file
- m) z( M& y( ]. [8 p2 H! w7 }9 c' D% \
-预处理器-
' U8 U( C0 S; b. A9 q7 X" T/FI 命名强制包含文件 name forced include file % {* {; W9 G% N* Y7 o4 }; v
/C 不吸取注释 don't strip comments
  @& `8 c' Z' E) R/U 移除预定义宏 remove predefined macro ; ?6 S& V8 U. s/ ?2 K6 r
/D{=|#} 定义宏 define macro + ~# x6 |  x0 l5 \% X, F/ d4 S! u6 B
/u 移除所有预定义宏 remove all predefined macros 1 ~( k. f* A8 K2 t/ V
/E 将预处理定向到标准输出 preprocess to stdout
% T) h- j8 |' Z6 p( j/I 添加到包含文件的搜索路径 add to include search path
4 o2 @7 i# L- X8 h* B/EP 将预处理定向到标准输出,不要带行号 preprocess to stdout, no #line
' R. M, G4 O8 k4 i/X 忽略“标准位置” ignore "standard places" 0 p1 O. d0 s9 I' ^  `- d6 b2 o, {1 k1 n
/P 预处理到文件 preprocess to file 9 [9 J) L2 X" k) g7 u' ~2 x

8 T5 B& J- r" I2 c% R6 G" k-语言- - Y3 D! c) v5 f6 S; [* ]
/Zi 启用调试信息 enable debugging information
9 x0 D- s) U3 Q- |- v/Zl 忽略 .OBJ 中的默认库名 omit default library name in .OBJ : I( H7 }3 ^; _# a! K, {
/ZI 启用调试信息的“编辑并继续”功能 enable Edit and Continue debug info * V: S* \# P1 f0 ~
/Zg 生成函数原型 generate function prototypes
  [4 Y4 d7 Z2 r: e/Z7 启用旧式调试信息 enable old-style debug info 8 C/ g* q" [% H
/Zs 只进行语法检查 syntax check only   `% G* X. j; M6 ~: r% V
/Zd 仅要行号调试信息 line number debugging info only
8 u) c: B  @( {1 v6 V/vd{0|1} 禁用/启用 vtordisp disable/enable vtordisp
8 y  f) f; ~5 O6 \+ ]' s/Zp[n] 在 n 字节边界上包装结构 pack structs on n-byte boundary , x  z% f3 v; Z) z, x
/vm 指向成员的指针类型 type of pointers to members
: Y  y6 k+ o3 u8 R: |8 G( Q5 P! O/Za 禁用扩展(暗指 /Op) disable extensions (implies /Op)
1 b7 r2 b: M+ G6 b" U/noBool 禁用“bool”关键字 disable "bool" keyword ' }! R! J2 ~/ R; v2 X/ }& g
/Ze 启用扩展(默认) enable extensions (default) 9 F2 d/ N9 `  p2 @5 v
. ]) R/ ?; J3 p8 v
- 杂项 - ' A+ r: N9 O& `: u. M; D% f
/?, /help 打印此帮助消息 print this help message
/ H7 s( k( X  ^! S/ k1 J) i/c 只编译,不链接 compile only, no link
5 E. r) d% H+ m/W 设置警告等级(默认 n=1) set warning level (default n=1)
/ _, w# d7 k6 w9 A) F; s# A% Z( y/H 最大化外部名称长度 max external name length
7 ^! p2 h5 a! F& ~$ L5 W/J 默认 char 类型是 unsigned default char type is unsigned
) M$ t0 z# P, t4 K2 M" F/nologo 取消显示版权消息 suppress copyright message " o* X8 v$ q0 H! S; R2 Z6 k: v
/WX 将警告视为错误 treat warnings as errors ' Y* @# ?1 `/ p9 d7 c2 ^* R
/Tc 将文件编译为 .c compile file as .c
- b9 v, }1 G2 U4 O' Z/Yc[file] 创建 .PCH 文件 create .PCH file
6 l, b0 s' X; y! Q' v) g. f/Tp 将文件编译为 .cpp compile file as .cpp : B/ c. i; u5 a3 q1 F$ J
/Yd 将调试信息放在每个 .OBJ 中 put debug info in every .OBJ
  P: M1 T9 V+ n/TC 将所有文件编译为 .c compile all files as .c
$ u- v- Q+ n6 h1 E; T# d/TP 将所有文件编译为 .cpp compile all files as .cpp 3 ^' n9 |! f/ f6 v* |/ L: z  l  u8 }
/Yu[file] 使用 .PCH 文件 use .PCH file
/ I$ _) _9 y# d' e/V 设置版本字符串 set version string
# B$ ^. T" K) n: v4 x% ^3 V3 N/YX[file] 自动的 .PCH 文件 automatic .PCH
7 Q- a8 k/ K% c: O/ ?6 j/w 禁用所有警告 disable all warnings - T9 ^. p4 D" m, H! y7 w
/Zm 最大内存分配(默认为 %) max memory alloc (% of default)
% ~; A& }3 `, W+ k* N
7 x% A8 O& r9 z3 `. @-链接-
6 ]- N( u- ]6 ]* [% n6 ?/MD 与 MSVCRT.LIB 链接 link with MSVCRT.LIB 5 v& t9 G7 e* K+ O5 C8 u: _
/MDd 与 MSVCRTD.LIB 调试库链接 link with MSVCRTD.LIB debug lib % }! o0 g  A; M* `8 @  t! _+ v
/ML 与 LIBC.LIB 链接 link with LIBC.LIB ) d9 x6 @9 ~1 D1 N6 e, T
/MLd 与 LIBCD.LIB 调试库链接 link with LIBCD.LIB debug lib
: M$ b5 I2 p3 U# r/MT 与 LIBCMT.LIB 链接 link with LIBCMT.LIB
0 t% m5 f" n- ?/MTd 与 LIBCMTD.LIB 调试库链接 link with LIBCMTD.LIB debug lib
$ U# V) L6 }4 P1 U' w" L/LD 创建 .DLL Create .DLL ) F4 F$ P8 b* O! l& q3 Q; g/ F
/F 设置堆栈大小 set stack size : o& E* T% O' z/ C6 i
/LDd 创建 .DLL 调试库 Create .DLL debug libary   D* X5 m) C3 t4 t
/link [链接器选项和库] [linker options and libraries]
您需要登录后才可以回帖 登录 | 加入计匠网

本版积分规则

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

GMT+8, 2026-5-26 08:22 , Processed in 0.397263 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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