Cl.exe

From EDM2
Jump to: navigation, search

CL.EXE is the filename of the real-mode or protected-mode C driver program from Microsoft C Optimizing Compiler, Microsoft C/C++ and the later Visual C++ products.

Versions

Date Version Size Comments
1996-02-05 6.00A.04 29,831 bytes 1990

Usage

cl [ option... ] filename... [ -link linkoption... ]
Options
Class Switch Description Doc Introduced
Memory Model AS small model
AC compact model
AM medium model
AL large model
AH huge model
AT tiny model (.COM files) C 6.0
Optimisation O enable optimization (same as /Ot)
Oa ignore aliasing
Od disable optimizations
Oe enable registers allocations
Og enable global optimization
Oi enable intrinsic functions
Ol enable loop optimizations
On disable "unsafe" optimizations
Op enable precision optimizations
Or disable in_line return
Os optimize for space
Ot optimize for speed
Ow assume aliasing in function calls
Ox max. optimization (/Oegilt /Gs)
Code Generation G0 8086 instructions
G1 186 instructions
G2 286 instructions
G3 386 instructions
G4 486 instructions
Gc Pascal style function calls
Gd cdecl returns C386
Gm put strings in constant segment
Gr _fastcall type calls
Gs no stack checking
Gt[number] data size threshold
Gw Windows entry sequence
Gz stdcall function calls
Output Files Fa [assembly listing file]
Fb [bound executable file]
Fc [mixed source/object listing file]
Fe <executable file>
Fl [object listing file]
Fm [map file]
Fo <object file>
Fr [source browser info file]
FR [extended source browser info file]
Fs [source listing file]
K keep temp files U
nologo disable logo U
Preprocessor C don't strip comments
D<name>[=text] define macro
E preprocess to stdout
EP same as /E but no #line
I<name> add #include path
P preprocess to file
U<name> remove predefined macro
u remove all predefined macros
X ignore "standard places"
Language Za disable extensions
Zd line number information
Ze enable extensions
Zg generate declarations
Zi symbolic debugging information
Zl remove default library info
Zp[n] pack structs on n-byte boundary
Zs syntax check only
Floating Point FPa calls with altmath
FPc calls with emulator
FPc87 calls with 8087 library
FPi inline with emulator
FPi87 inline with 8087
Source Listing Sl<columns> set line width
Sp<lines> set page length
St<string> set title string
Ss<string> set subtitle string
Miscellaneous B[123] <pass> to invoke different C[123]
c compile only, no link
H<number> external name length
J default char type is unsigned
qc use quick compile feature
Tc<file> compile file without .c
V<string> set version string
W<number> warning level
MASM Support MA <MASM switch>
Ta<file> assemble file without .asm
Fx [MASM's cross-reference file]
Linking F <hex_number> stack size (hex. bytes)
Lc link compatibility mode executable
Lr link compatibility mode executable
Lp link protect mode executable
link [linker_options_and_libraries]
ML link C runtime as part of DLL
MD use C runtime as DLL
MT support multi-thread