《点石成金》:C/C++ COMPILER OPTIONS (CL 编译器)
来源:百度文库 编辑:中财网 时间:2024/05/05 18:37:28
C/C++ COMPILER OPTIONS
-OPTIMIZATION-
/O1 minimize space /Op[-] improve floating-pt consistency
/O2 maximize speed /Os favor code space
/Oa assume no aliasing /Ot favor code speed
/Ob
/Od disable optimizations (default) /Ox maximum opts. (/Ogityb1 /Gs)
/Og enable global optimization /Oy[-] enable frame pointer omission
/Oi enable intrinsic functions
-CODE GENERATION-
/G3 optimize for 80386 /Gy separate functions for linker
/G4 optimize for 80486 /Ge force stack checking for all funcs
/G5 optimize for Pentium /Gs[num] disable stack checking calls
/G6 optimize for Pentium Pro /Gh enable hook function call
/GB optimize for blended model (default) /GR[-] enable C++ RTTI
/Gd __cdecl calling convention /GX[-] enable C++ EH (same as /EHsc)
/Gr __fastcall calling convention /Gi[-] enable incremental compilation
/Gz __stdcall calling convention /Gm[-] enable minimal rebuild
/GA optimize for Windows Application /EHs enable synchronous C++ EH
/GD optimize for Windows DLL /EHa enable asynchronous C++ EH
/Gf enable string pooling /EHc extern "C" defaults to nothrow
/GF enable read-only string pooling /QIfdiv[-] enable Pentium FDIV fix
/GZ enable runtime debug checks /QI0f[-] enable Pentium 0x0f fix
-OUTPUT FILES-
/Fa[file] name assembly listing file /Fo
/FA[sc] configure assembly listing /Fp
/Fd[file] name .PDB file /Fr[file] name source browser file
/Fe
/Fm[file] name map file
-PREPROCESSOR-
/C don't strip comments /FI
/D
/E preprocess to stdout /u remove all predefined macros
/EP preprocess to stdout, no #line /I
/P preprocess to file /X ignore "standard places"
-LANGUAGE-
/Zi enable debugging information /Zl omit default library name in .OBJ
/ZI enable Edit and Continue debug info /Zg generate function prototypes
/Z7 enable old-style debug info /Zs syntax check only
/Zd line number debugging info only /vd{0|1} disable/enable vtordisp
/Zp[n] pack structs on n-byte boundary /vm
/Za disable extensions (implies /Op) /noBool disable "bool" keyword
/Ze enable extensions (default)
-MISCELLANEOUS-
/?, /help print this help message /V
/c compile only, no link /w disable all warnings
/H
/J default char type is unsigned /WX treat warnings as errors
/nologo suppress copyright message /Yc[file] create .PCH file
/Tc
-LINKING-
/MD link with MSVCRT.LIB /MDd link with MSVCRTD.LIB debug lib
/ML link with LIBC.LIB /MLd link with LIBCD.LIB debug lib
/MT link with LIBCMT.LIB /MTd link with LIBCMTD.LIB debug lib
/LD Create .DLL /F
/LDd Create .DLL debug libary /link [linker options and libraries]