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

[转载]cl的编译参数

[复制链接]
发表于 2009-4-15 15:14:27 | 显示全部楼层 |阅读模式
-优化-( r" q% \3 ?8 Z% y# |3 O
/O1 最小化空间 minimize space ) D) Y( _8 ]# u) |  s* J1 d
/Op[-] 改善浮点数一致性 improve floating-pt consistency
' z- \/ ], x8 c' b8 |/O2 最大化速度 maximize speed 8 ]! y0 f) t- X. c
/Os 优选代码空间 favor code space
' m2 q* N5 h# ~* s6 e# T/Oa 假设没有别名 assume no aliasing + }, h/ A- @- T
/Ot 优选代码速度 favor code speed 6 U, W' p) w3 J
/Ob 内联展开(默认 n=0) inline expansion (default n=0)
, y/ C1 G6 f. q0 A$ J& N/Ow 假设交叉函数别名 assume cross-function aliasing % x0 l! e; x5 _% k9 M' \! w
/Od 禁用优化(默认值) disable optimizations (default) ) m! G$ ?6 P; v+ [" N
/Ox 最大化选项。(/Ogityb2 /Gs) maximum opts. (/Ogityb1 /Gs) * l3 O9 p) L$ Y9 M  ~, t
/Og 启用全局优化 enable global optimization
+ x. P, O( U8 S. D$ ^/Oy[-] 启用框架指针省略 enable frame pointer omission % G- w* q: |9 `; x9 |, E
/Oi 启用内建函数 enable intrinsic functions * f2 ]7 S( {! b* ]7 }" G) X  V

5 x& N9 g( W/ \' q-代码生成- * s6 H8 f: P* M& S5 x
/G3 为 80386 进行优化 optimize for 80386 ' J, h0 j2 C% C5 o8 y% f
/G4 为 80486 进行优化 optimize for 80486
! m2 }" m3 g* }1 r! [3 h4 n5 D+ b/GR[-] 启用 C++ RTTI enable C++ RTTI
, r; z/ p& X7 D& e1 ^8 |/G5 为 Pentium 进行优化 optimize for Pentium * o+ V0 y, Y  D+ {8 _7 A0 w
/G6 为 Pentium Pro 进行优化 optimize for Pentium Pro 5 D/ O" @2 c$ @1 i& R
/GX[-] 启用 C++ 异常处理(与 /EHsc 相同) enable C++ EH (same as /EHsc) : x, ?3 p" G! S( O% K5 l4 D; m
/EHs 启用同步 C++ 异常处理 enable synchronous C++ EH   w5 t. j5 t3 P3 ^( O2 z+ k
/GD 为 Windows DLL 进行优化 optimize for Windows DLL
  M2 ?, a: W% J* v1 T4 r/GB 为混合模型进行优化(默认) optimize for blended model (default)
% C, H, z4 O8 s; V  j* Q- D/EHa 启用异步 C++ 异常处理 enable asynchronous C++ EH 3 Q, S% Y' N  D
/Gd __cdecl 调用约定 __cdecl calling convention
  N; V4 e% N, F4 z/EHc extern“C”默认为 nothrow extern "C" defaults to nothrow
4 c# h$ o, l! }9 M  o/Gr __fastcall 调用约定 __fastcall calling convention
1 |% i- P# W6 p7 H/Gi[-] 启用增量编译 enable incremental compilation
# t% O% B) p/ ]3 q/Gz __stdcall 调用约定 __stdcall calling convention , x6 P3 i  q- {2 [1 Q* U- z
/Gm[-] 启用最小重新生成 enable minimal rebuild
$ V& X; J0 \" n! {! g5 Q; _# d/GA 为 Windows 应用程序进行优化 optimize for Windows Application " e' S4 n/ w, E; I' h& B
/Gf 启用字符串池 enable string pooling
, \5 [1 D* G- n# P! h1 L/QIfdiv[-] 启用 Pentium FDIV 修复 enable Pentium FDIV fix 2 f0 G$ v# a3 U3 I) R+ F2 I2 n
/GF 启用只读字符串池 enable read-only string pooling
% [3 u2 N. H* l4 s$ j7 w/QI0f[-] 启用 Pentium 0x0f 修复 enable Pentium 0x0f fix
9 @  p- s7 o: x5 s9 w; C/ K/Gy 分隔链接器函数 separate functions for linker
: o" E: c! n' P% |* f" Y$ N/GZ 启用运行时调试检查 enable runtime debug checks
3 \7 B0 i5 e( r& v) s/Gh 启用钩子函数调用 enable hook function call + R9 |8 `9 r$ _  f$ }- X
/Ge 对所有函数强制堆栈检查 force stack checking for all funcs ' Y6 M% O. m0 ~* D
/Gs[num] 禁用堆栈检查调用 disable stack checking calls
; o4 z4 X) n+ k* }
+ W* G8 g) c! u, j-输出文件- - q& Q$ h5 M6 p, `5 x; P* e
/Fa[file] 命名程序集列表文件 name assembly listing file
$ a3 s1 t5 B- q# D/Fo 命名对象文件 name object file
9 y! o  i5 W  `4 }! c/FA[sc] 配置程序集列表 configure assembly listing
+ a. K: a: k9 }9 ?5 H6 l: k/Fp 命名预编译头文件 name precompiled header file
2 J( I  d" [& z; ^0 ]% p/Fd[file] 命名 .PDB 文件 name .PDB file : J' l& f5 J4 f' ~* y
/Fr[file] 命名源浏览器文件 name source browser file
8 V  w* h! H/ e5 N& {" ], d  Y1 ?/Fe 命名可执行文件 name executable file
; c: f( b# |* f' ]/FR[file] 命名扩展 .SBR 文件 name extended .SBR file
3 k. U7 Y$ e9 \" a/Fm[file] 命名映射文件 name map file
9 O+ i, U: `3 f; E
4 f& m9 C; x1 v! x- _% L-预处理器-
5 Y2 D* H0 \4 a# W/FI 命名强制包含文件 name forced include file
8 r0 J- O9 q) e/C 不吸取注释 don't strip comments " Y3 q2 s0 r0 X4 Y# k; O
/U 移除预定义宏 remove predefined macro
- ~- R( {9 d7 G/D{=|#} 定义宏 define macro
# g; Q/ e( N2 W! R/u 移除所有预定义宏 remove all predefined macros * x( g9 |. Q4 [7 k
/E 将预处理定向到标准输出 preprocess to stdout / {5 \3 p( \2 i  f& b/ o4 |
/I 添加到包含文件的搜索路径 add to include search path
0 Z1 \2 w/ x% ]9 M/ ~" D* w/EP 将预处理定向到标准输出,不要带行号 preprocess to stdout, no #line & l1 W5 D2 d# f2 D6 }+ I
/X 忽略“标准位置” ignore "standard places" ( I# @; n6 n, W# z9 l8 \/ ?! a7 d- t
/P 预处理到文件 preprocess to file
  ^) ?' `/ w# V6 x! ]- U6 \; B) L/ ^/ Q  r% s
-语言-
5 A: U* L2 a* D1 G/Zi 启用调试信息 enable debugging information
/ I8 g; T, T0 S5 m* I/Zl 忽略 .OBJ 中的默认库名 omit default library name in .OBJ 4 B# R% i# t/ ]8 |. i
/ZI 启用调试信息的“编辑并继续”功能 enable Edit and Continue debug info
' t( B$ b: l1 L) [8 V+ d' M/Zg 生成函数原型 generate function prototypes
" E7 M' |; @5 \9 e/ |/Z7 启用旧式调试信息 enable old-style debug info
. W! R( O' d+ x& h/Zs 只进行语法检查 syntax check only
7 J/ p  B/ }: g$ R3 v; O/Zd 仅要行号调试信息 line number debugging info only $ }* F' Q( G% W0 S  n
/vd{0|1} 禁用/启用 vtordisp disable/enable vtordisp
7 g2 s5 ]+ z, m. v& M) H/Zp[n] 在 n 字节边界上包装结构 pack structs on n-byte boundary
: `: X* S) e8 P/ C/vm 指向成员的指针类型 type of pointers to members
3 s1 e4 ~0 g& ^7 I8 y/Za 禁用扩展(暗指 /Op) disable extensions (implies /Op) % ?' G5 N4 ]8 i% |
/noBool 禁用“bool”关键字 disable "bool" keyword
& @3 F5 A" }6 V2 R; h( X( J/Ze 启用扩展(默认) enable extensions (default)
! |8 Y6 H+ [1 B. P, @4 `8 n: A1 k+ s$ R
- 杂项 -
: {, N1 g7 B1 e9 w+ }7 Y! X/?, /help 打印此帮助消息 print this help message ; n8 u( a  q! x0 M- b# B  K
/c 只编译,不链接 compile only, no link
. d# V2 ]  i* u9 x3 o$ i- ?& Q4 b/W 设置警告等级(默认 n=1) set warning level (default n=1)
" @+ d/ x- y' B3 W% e- u0 N/H 最大化外部名称长度 max external name length
# w) `. }7 d9 m8 I6 G$ w/J 默认 char 类型是 unsigned default char type is unsigned / }8 {' m2 x. v+ R: _/ V/ }; L
/nologo 取消显示版权消息 suppress copyright message / J8 d& Y" a, j1 u3 w/ [2 V# V
/WX 将警告视为错误 treat warnings as errors
0 ~3 E$ \- C% s( |% Q/Tc 将文件编译为 .c compile file as .c
- v' E5 ~7 A) e% s# G( y/Yc[file] 创建 .PCH 文件 create .PCH file , z0 C& ]/ J) o4 A
/Tp 将文件编译为 .cpp compile file as .cpp
% P, b$ q  w9 ^( L0 q: x! ?- Y/Yd 将调试信息放在每个 .OBJ 中 put debug info in every .OBJ
8 H  L" C9 {& g3 Q) K9 a# m0 V/TC 将所有文件编译为 .c compile all files as .c
6 g( J+ S- U6 @: ~5 r/TP 将所有文件编译为 .cpp compile all files as .cpp   _4 s6 v5 N6 i9 m: X1 j
/Yu[file] 使用 .PCH 文件 use .PCH file   ^' y9 u8 \3 E' |  {' f% k: S
/V 设置版本字符串 set version string
* d8 f6 q. I% A& {2 H' }3 I/YX[file] 自动的 .PCH 文件 automatic .PCH 3 K* i: ^9 }. g4 [
/w 禁用所有警告 disable all warnings
& |2 X$ r  F' N. f4 g9 T, `4 l+ ]/Zm 最大内存分配(默认为 %) max memory alloc (% of default)
& r8 t$ b) T  c& z9 ~: |4 E' ^* Z
-链接-
( m# j& l# T0 e# s3 s/MD 与 MSVCRT.LIB 链接 link with MSVCRT.LIB
' v( C* w9 U9 U6 X' A% H$ x/MDd 与 MSVCRTD.LIB 调试库链接 link with MSVCRTD.LIB debug lib * q: H2 D: E) D  S
/ML 与 LIBC.LIB 链接 link with LIBC.LIB
/ |$ m! [6 w+ M! p6 g1 F. [/ H7 ]  ^9 t/MLd 与 LIBCD.LIB 调试库链接 link with LIBCD.LIB debug lib # h7 k: b+ s5 a- H; j
/MT 与 LIBCMT.LIB 链接 link with LIBCMT.LIB
5 i$ y; C* G- ^- L$ n. ~; S/MTd 与 LIBCMTD.LIB 调试库链接 link with LIBCMTD.LIB debug lib 2 U" Q8 h" A! w3 z& A
/LD 创建 .DLL Create .DLL
# t& c% m* b: S/F 设置堆栈大小 set stack size ' x( Q+ \  R) x; \0 G
/LDd 创建 .DLL 调试库 Create .DLL debug libary
4 J) `* X# f, ~( ^' y0 l  [& S/link [链接器选项和库] [linker options and libraries]
您需要登录后才可以回帖 登录 | 加入计匠网

本版积分规则

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

GMT+8, 2026-8-11 16:05 , Processed in 0.053575 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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