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

[转载]cl的编译参数

[复制链接]
发表于 2009-4-15 15:14:27 | 显示全部楼层 |阅读模式
-优化-( g! i) _6 q, m8 n  R+ v( G" v# j
/O1 最小化空间 minimize space
9 L. s3 v% |: S. |- l/Op[-] 改善浮点数一致性 improve floating-pt consistency 6 M# K) h0 e  {1 M( Z3 J
/O2 最大化速度 maximize speed
5 e! S  I- a6 I- B: i9 |/ Q) Q( W/Os 优选代码空间 favor code space ' A7 f. g9 U/ \5 j7 S# x, Q% w
/Oa 假设没有别名 assume no aliasing 4 N4 b& |: I8 t$ ?+ u
/Ot 优选代码速度 favor code speed
* Z# U+ M# Q' |- S/Ob 内联展开(默认 n=0) inline expansion (default n=0)
% T' T( P8 t' q' W3 p/Ow 假设交叉函数别名 assume cross-function aliasing / q8 _+ q8 Q" J3 Y, L
/Od 禁用优化(默认值) disable optimizations (default) 3 |3 X" f4 p) Y; m& e
/Ox 最大化选项。(/Ogityb2 /Gs) maximum opts. (/Ogityb1 /Gs)
; _% B6 ?1 ]% a, s( y3 S/Og 启用全局优化 enable global optimization
: N3 C9 N, }2 @/Oy[-] 启用框架指针省略 enable frame pointer omission + Z0 V; q# A" s2 }1 Z
/Oi 启用内建函数 enable intrinsic functions
0 O5 `! y% c$ d' g7 {# [1 \  Q
# J, U: |3 A9 R) \4 Y-代码生成- & w, S$ b! S. G' X1 v8 ]7 }
/G3 为 80386 进行优化 optimize for 80386 " o6 b  Q) J3 V  `: D
/G4 为 80486 进行优化 optimize for 80486
8 o( @# l, r$ K% l1 C3 \" c& ^/GR[-] 启用 C++ RTTI enable C++ RTTI
7 D, ~; V+ G+ n& d/G5 为 Pentium 进行优化 optimize for Pentium
7 e) K/ Y+ ]3 F; n5 `) U5 C" {/G6 为 Pentium Pro 进行优化 optimize for Pentium Pro " ^  d  E% u1 B! k# }/ w& T6 D
/GX[-] 启用 C++ 异常处理(与 /EHsc 相同) enable C++ EH (same as /EHsc)
, m/ i4 l& [3 L5 |$ I/ H; [$ Q& m, R/EHs 启用同步 C++ 异常处理 enable synchronous C++ EH 7 s2 y+ ]2 s8 w: W3 [. O& y
/GD 为 Windows DLL 进行优化 optimize for Windows DLL
. C2 o! D  x5 D0 g( l2 i/GB 为混合模型进行优化(默认) optimize for blended model (default)
. {9 X/ c+ Y; r/EHa 启用异步 C++ 异常处理 enable asynchronous C++ EH
# h/ g* A/ `( W/ D' y/Gd __cdecl 调用约定 __cdecl calling convention + S/ Y+ d) s$ H1 l  n* {
/EHc extern“C”默认为 nothrow extern "C" defaults to nothrow
- j6 U" Q- u. H3 a/Gr __fastcall 调用约定 __fastcall calling convention 4 h; N# p* V5 B# @9 ]% G( @1 F1 u
/Gi[-] 启用增量编译 enable incremental compilation
0 u! i$ f: }8 O% d$ ]+ J4 X/Gz __stdcall 调用约定 __stdcall calling convention
# Q( A, A% {2 s9 f( {8 P/Gm[-] 启用最小重新生成 enable minimal rebuild   x, h) [* m" v3 W
/GA 为 Windows 应用程序进行优化 optimize for Windows Application ( }7 F7 g+ C3 `3 X3 Q
/Gf 启用字符串池 enable string pooling
: m+ h: y  _+ V) P. F  ]% z/QIfdiv[-] 启用 Pentium FDIV 修复 enable Pentium FDIV fix , t. {- F: g) v9 Q
/GF 启用只读字符串池 enable read-only string pooling 1 E5 f* v: e+ o
/QI0f[-] 启用 Pentium 0x0f 修复 enable Pentium 0x0f fix
! G5 ]& Q, k! e! w+ F$ e9 ]' R5 I( c/Gy 分隔链接器函数 separate functions for linker 4 I: O1 u/ K; A0 k6 I) I3 V' A: P6 @
/GZ 启用运行时调试检查 enable runtime debug checks
, r/ m& i  t+ ~7 v0 r+ m) a/Gh 启用钩子函数调用 enable hook function call
. x6 U) d3 u- _3 s/Ge 对所有函数强制堆栈检查 force stack checking for all funcs
6 l' e% [1 d) x1 ?1 L" |/Gs[num] 禁用堆栈检查调用 disable stack checking calls
# Q8 v) M  x9 s0 x0 F5 F* ^  F( i5 d* ~" G* _
-输出文件- 0 a$ ^; ^2 S8 o# |! E$ f
/Fa[file] 命名程序集列表文件 name assembly listing file
8 n/ `  b6 ~. t5 f1 g7 I& O! M9 O  c/Fo 命名对象文件 name object file - `  l, M0 C7 Q8 _
/FA[sc] 配置程序集列表 configure assembly listing - K! {; I/ E3 g: N# e, T3 E/ e
/Fp 命名预编译头文件 name precompiled header file 6 y7 i' |4 V( c. B
/Fd[file] 命名 .PDB 文件 name .PDB file 7 l* v6 v; w& o
/Fr[file] 命名源浏览器文件 name source browser file ; h$ c9 \. i2 F8 d4 J/ y+ E
/Fe 命名可执行文件 name executable file
7 j2 L, T2 v$ e4 z6 B) @; J/FR[file] 命名扩展 .SBR 文件 name extended .SBR file ; _  V; z& R: y1 @7 _
/Fm[file] 命名映射文件 name map file : C9 k& Q$ X. B# `4 ~. [& J
6 X1 |  O# L4 J
-预处理器-
0 D, N8 @( B* x: _/FI 命名强制包含文件 name forced include file ) I3 V# E, Q' P
/C 不吸取注释 don't strip comments
0 f' l5 e' Y/ @, ?) h/U 移除预定义宏 remove predefined macro
. z3 r" c( j) b2 P7 Y9 s. f/D{=|#} 定义宏 define macro 3 {9 K6 M$ R& U# |5 o2 \6 P/ {( J/ q( H2 m
/u 移除所有预定义宏 remove all predefined macros " o3 K7 x3 @  Z' F3 z
/E 将预处理定向到标准输出 preprocess to stdout 5 o$ g3 ?0 m  j
/I 添加到包含文件的搜索路径 add to include search path . I% d/ k& B1 g4 h
/EP 将预处理定向到标准输出,不要带行号 preprocess to stdout, no #line 2 S5 y  K% y# x
/X 忽略“标准位置” ignore "standard places" " k8 a" n( |7 x7 R' e$ O
/P 预处理到文件 preprocess to file
9 Q. G* z/ Q; f0 n3 @
$ q2 h9 {/ O6 {1 L! }-语言-
' e2 ~* t% c5 d4 E/Zi 启用调试信息 enable debugging information
( J4 u6 S+ i1 c; k/Zl 忽略 .OBJ 中的默认库名 omit default library name in .OBJ 8 ?, X6 b8 R2 G& ^. n; M0 M( m, u
/ZI 启用调试信息的“编辑并继续”功能 enable Edit and Continue debug info
, O+ q) ]4 k; t! c6 k  o/Zg 生成函数原型 generate function prototypes % ?. v6 }4 K" a
/Z7 启用旧式调试信息 enable old-style debug info
/ i/ H+ @- O) w0 X- U1 X/Zs 只进行语法检查 syntax check only : v) F5 U+ c( J: Y9 w3 e
/Zd 仅要行号调试信息 line number debugging info only
' q$ E+ c+ i) m" o2 e/vd{0|1} 禁用/启用 vtordisp disable/enable vtordisp
( e( I$ K, z  M/ A% z8 D9 Q/Zp[n] 在 n 字节边界上包装结构 pack structs on n-byte boundary
2 L; @% ]* b: @/vm 指向成员的指针类型 type of pointers to members
5 W2 R: g/ R6 h$ ]7 V: z7 {/Za 禁用扩展(暗指 /Op) disable extensions (implies /Op) 3 ]% f9 T7 v% V4 y( \
/noBool 禁用“bool”关键字 disable "bool" keyword
, j9 J- a% z9 j9 u5 _7 g+ S8 ~/Ze 启用扩展(默认) enable extensions (default) * R+ `1 J% @, f3 ^

( g1 ~* b7 X6 c1 k. y5 O- 杂项 -
! _* H) ~0 {2 k7 O0 y8 q7 @+ v/?, /help 打印此帮助消息 print this help message
/ o8 Z( d9 B* g2 r8 G/c 只编译,不链接 compile only, no link
6 o( Y: |. {1 S3 o/W 设置警告等级(默认 n=1) set warning level (default n=1) / O$ W+ P1 R1 l1 u5 @& o* E
/H 最大化外部名称长度 max external name length 2 Z6 K- h2 Y: }, ]( d0 x( x
/J 默认 char 类型是 unsigned default char type is unsigned
* t* p3 _$ w' L/nologo 取消显示版权消息 suppress copyright message
& k; Q( ~- O( ^# U/WX 将警告视为错误 treat warnings as errors
& e6 o3 y5 U) ^/ t) `) X/Tc 将文件编译为 .c compile file as .c
. ?, X$ \; A& C' {/Yc[file] 创建 .PCH 文件 create .PCH file
3 c+ [% i# h2 {/Tp 将文件编译为 .cpp compile file as .cpp
. F% C1 j6 C' j8 t/Yd 将调试信息放在每个 .OBJ 中 put debug info in every .OBJ
" r9 g( Y/ V& Y5 a' N/TC 将所有文件编译为 .c compile all files as .c
2 m( {6 Q" ^' i8 u7 @/TP 将所有文件编译为 .cpp compile all files as .cpp
/ V: g5 n$ A* F6 |  ~/Yu[file] 使用 .PCH 文件 use .PCH file
7 o0 o# W" Z1 d7 ?5 T" A/V 设置版本字符串 set version string 3 s, N9 U! x3 a
/YX[file] 自动的 .PCH 文件 automatic .PCH 8 Q% c& H# F$ |6 P- C5 M
/w 禁用所有警告 disable all warnings
! @: K  \6 n6 S2 K& p/Zm 最大内存分配(默认为 %) max memory alloc (% of default)
% L+ [! v6 O0 ?2 Z5 ~, g# I2 W, K5 p4 A/ B% c' }7 k
-链接-
1 n1 m/ b6 y  [2 {# K1 x/MD 与 MSVCRT.LIB 链接 link with MSVCRT.LIB
% p3 j, r5 c" e2 I7 A# y7 R/MDd 与 MSVCRTD.LIB 调试库链接 link with MSVCRTD.LIB debug lib % ^7 g( d) ~% _4 K- h
/ML 与 LIBC.LIB 链接 link with LIBC.LIB
" S% M( p9 w- U/ `1 d* @( ?  P( V/MLd 与 LIBCD.LIB 调试库链接 link with LIBCD.LIB debug lib
0 w0 w, \& z0 \$ p. b5 x/MT 与 LIBCMT.LIB 链接 link with LIBCMT.LIB ( B/ d6 h# o- o8 i& h
/MTd 与 LIBCMTD.LIB 调试库链接 link with LIBCMTD.LIB debug lib
+ N  o& g$ H) n) d) e/LD 创建 .DLL Create .DLL " D6 E: Y7 ?4 G5 H! J  u# u( ~  x
/F 设置堆栈大小 set stack size
; S9 A" c, ?; R2 ?/LDd 创建 .DLL 调试库 Create .DLL debug libary 6 V( G5 q: M8 m) M
/link [链接器选项和库] [linker options and libraries]
您需要登录后才可以回帖 登录 | 加入计匠网

本版积分规则

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

GMT+8, 2026-10-20 07:38 , Processed in 0.305264 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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