Compiler Options

The Windows CE Toolkit for Visual C++ 5.0 uses different compilers to build for the various supported target platforms. The following options are available with both the SH3 and MIPS compilers unless otherwise indicated. "MIPS only" indicates that the option is available only on the MIPS compiler Clmips.exe. "SH only" indicates that the option is available only on the SH compiler Shcl.exe.

-OPTIMIZATION-
/O1 minimize space /Op[-] improve floating-point consistency
/O2 maximize speed /Os favor code space
/Oa assume no aliasing (MIPS only) /Ot favor code speed
/Ob<n> inline expansion (default n=0) /Ow assume cross-function aliasing (MIPS only)
/Od disable optimizations (default) /Ox maximum opts. (/Ogitb1 /Gs)
/Og enable global optimization /Oy[-] enable frame pointer omission
/Oi enable intrinsic functions /Qtime[0-9] Opt for 0=space vs. 9=time (SH only)
-OUTPUT FILES-
/Fa[file] name assembly listing file /Fp<file> name precompiled header file
/FA[sc] configure assembly listing /Fr[file] name source browser file
/Fd[file] name .PDB file (MIPS only) /FR[file] name extended .SBR file
/Fe<file> name executable file /Fo<file> name object file
/Fm[file] name map file
-PREPROCESSOR-
/C don't strip comments /U<name> remove predefined macro
/D<name>{=|#}<text> define macro /u remove all predefined macros
/E preprocess to stdout /I<dir> add to include search path
/EP preprocess to stdout, no #line /X ignore "standard places"
/P preprocess to file /FI<file> name forced include file
-LANGUAGE-
/vd{0|1} disable/enable vtordisp (MIPS only) /Za disable extensions (implies /Op)
/vm<x> type of pointers to members (MIPS only) /Ze enable extensions (default)
/Zi generate debugging information /Zg generate function prototypes
/Z7 generate old-style debug info /Zl omit default library name in .OBJ
/Zd line number debugging info only /Zs syntax check only
/Zp[n] pack structs on n-byte boundary
-MISCELLANEOUS-
/?, /help print this help message /w disable all warnings
/c compile only, no link /W<n> set warning level (default n=1)
/H<num> max external name length (MIPS only) /WX treat warnings as errors
/J default char type is unsigned /Yc[file] create .PCH file
/nologo suppress copyright message /Yd put debug info in every .OBJ (MIPS only)
/Tc<source file> compile file as .c /Yu[file] use .PCH file
/Tp<source file> compile file as .cpp /YX[file] automatic .PCH
/V<string> set version string /Zn turn off SBRPACK for .SBR files
-LINKING-
/F<num> set stack size /LDd Create .DLL debug library (MIPS only)
/LD Create .DLL /link [linker options and libraries]
-CODE GENERATION (General)-
/Gd __cdecl calling convention (MIPS only) /Gh enable hook function call (MIPS only)
/Gr __fastcall calling convention (MIPS only) /GR[-] enable C++ RTTI
/Gf enable string pooling /Gy separate functions for linker
/GF enable read-only string pooling /Gt[n] data objects <= n bytes are near (MIPS only)
/Ge enable stack checking calls (MIPS only)
/Gs[num] disable stack checking calls (MIPS only)
-CODE GENERATION (Machine Specific)-
/QMRWCE generate Windows CE MIPS code /Qsh3r3 generate code for SH3 Rev. 3 (SH only)
/QMmips1 MIPS1 ISA (MIPS only) /Qsh3r4 generate code for SH3 Rev. 4 (SH only)
/QMmips2 MIPS2 ISA(default) (MIPS only) /Qsh3r5 generate code for SH3 Rev. 5 (SH only)
/QMmips3 MIPS3 ISA (MIPS only) /Qsh3r6 generate code for SH3 Rev. 6 (SH only)
/QMmips4 MIPS4 ISA (MIPS only) /Qsh3r7 generate code for SH3 Rev. 7 (SH only)
/QMNoDivCheck no divide by zero check (MIPS only) /Qsh3r8 generate code for SH3 Rev. 8 (SH only)
/QMOb<n> basic block threshold (MIPS only)
/QMOu<n> unroll n loop iterations (MIPS only)
/QMPux<n> use mips3 opcodes if n=1 (MIPS only)