## 2.4 Options to Set the Compiler State

For the following options, the order is important, and even in which order they are intermixed with the input files: When an input file is processed, the compiler state is determined by all options preceding it. Options may be overridden by other options given later on the command line.

### Macro Directives

`-D` NAME, `--define=`NAME

  Define macro NAME. Macros allow for conditional compilation using `\ifdef` NAME and `\ifndef` NAME macro directives.

`-U` NAME, `--undefine=`NAME

  Undefines macro NAME.

### Environment

`-l` MODULES, `--environment=`MODULES

  Makes MODULES, a comma-separated list of pairs VAR`=`URL, available in the environment. For each VAR`=`URL, the module available through the functor at URL is obtained and VAR is bound to it. The source files then compiled can reference variable VAR.

### Inserting Files

`-I` DIR, `--incdir=`DIR

  Adds DIR to the head of `OZPATH` which is used to locate files to `\insert`.

`--include=`FILE

  Compile and execute the statement in FILE before processing the remaining options. For instance, this can be used to extend the compilation environment by executing a `declare`.

### Compiler Switches

Most of the compiler switches can be set via command line options. Please refer to Appendix A of ``The Mozart Compiler'' for more detailed descriptions and defaults.

`-g`, `--(no)debuginfo`

  Emits code with debugging information. Use this option if you want to use the Mozart Debugger. The `-g` option is actually an abbreviation for the combination of `--controlflowinfo` and `--staticvarnames`.

`--(no)controlflowinfo`

  Include control flow information.

`--(no)staticvarnames`

  Include static variable name information.

`--(no)dynamicvarnames`

  Attach print names to variables created at run-time.

`-p`, `--(no)profile`

  Emits code with profiling information. Use this option if you want to use the Mozart Profiler.

`--(no)gump`

  Allow Gump definitions.

`--(no)compilerpasses`

  Show compiler passes.

`--(no)warnredecl`

  Warn about top-level redeclarations.

`--(no)warnshadow`

  Warn about all redeclarations.

`--(no)warnunused`

  Warn about unused variables.

`--(no)warnunusedformals`

  Warn about unused variables and formals.

`--(no)warnforward`

  Warn about forward class declarations.

`--(no)warnopt`

  Warn about missed optimizations.

`--(no)expression`

  Expect expressions, not statements.

`--(no)allowdeprecated`

  Allow use of deprecated syntax.

`--(no)staticanalysis`

  Run static analysis.

`--(no)realcore`

  Output the real non-fancy core syntax.

`--(no)debugvalue`

  Annotate variable values in core output.

`--(no)debugtype`

  Annotate variable types in core output.

### Compiler Options

`--maxerrors=`N

  Limit the number of errors reported to N.

`--baseurl=`STRING

  Set the base URL to resolve imports of computed functors to STRING.

`--gumpdirectory=`STRING

  Set the directory where Gump output files are placed to STRING.