Compiler Options

Abstract

This document describes the options available for the command line version of Visual Eiffel (vec.exe). The most important of them are also available from the workbench in a more convenient form.

Contents

Basics

Most options are case insensitive, i.e. you can enter them in capitals or in small letters. However, some "dangerous" options must be entered in capitals, to reduce the risk of executing them by accident.

All options marked with a (x) are compiler toggles which set different modes of the compiler and apply to all commands from the current invocation. Options without this mark are direct commands executed from left to right. It is important to know about this difference, as a wrong sequence of commands may result in a "wrong" compilation:

vec /p:precomp.eld /ec

precompiles a cluster and saves the result in an "export library" so that it can be imported later or distributed in a precompiled form to customers.

vec /ec /p:precomp.eld

will do the same, but export before the actual precompilation. This will cause the cluster to be exported in non-precompiled form, or an error message if the cluster does not exist...

Overview

the general format of the command line is

vec @<File>

or

vec { <source file> | - <Option> }

The first variant allows the options to be placed in a response file. The second variant - the real one - consists of two parts. Both of them are optional:

The source files to be parsed:

This is only necessary if no system is being assembled. This is useful when syntax checking, or preparing for the delivery of precompiled Eiffel classes. In all other cases this part of the command line is not used.

Example 1.

vec *

compiles all *.e files in the current directory.

Example 2.

vec hello.e list.b

compiles all Eiffel classes in hello.e and list.b (which should contain real Eiffel text - a business letter will probably result in a syntax error message, maybe several of them).

The "real" options:

vec /a:hello.esd /t

parses any files that have changed and then assembles the Eiffel system described in hello.esd. The time spent on each different step is displayed to the screen. Instead of / one can also use -, so

vec -a:hello.esd -t

will also work. As /t is a toggle it can be written in any position:

vec -t -a:hello.esd

...is an equivalent call.

General options

Option Toggle Description
?   Display a short help screen
h   Display an advanced multi-page help screen
t x Log and display the compilation time used for each task (parsing, linking etc)
st x Display parsing statistics
no x No screen output
fo x All output will also be sent to file vec.out in the directory from which the compiler is invoked.
to x Reduced ("tiny") screen output
sw x Show warnings in output
sane:xx x Stop after xx errors

Parser options

The parser is a syntax analyzer responsible for transforming Eiffel source code located in one or more files into internal data structures and saving them on disk. The parser stops after the first error is detected. If this happens it reports the error, indicating the position in the source file where it was detected.

Option Toggle Description
*   Parse all Eiffel files in the cluster
<SourceFile[.Ext]>   Parse specified Eiffel files
ap x Parse without time checking: The parser normally compares the timestamps of the source file and of the internal representation to determine whether parsing is required. If you specify /ap then the compiler will always parse all source files.
nd x Do not save documentation of the class: Each Eiffel class includes some documentation - indexing, obsolete clause, feature comments and feature obsoletes. This information is stored in a special data file and made available to the browser. If you are short of disk space you can set this option and documentation information will not be saved.
sd x Strip debug instructions: This allows you to save some disk space by removing debug instructions from the internal class representations.

System options

Option Toggle Description
a:<FileName>   Assemble system (FileName is an .esd file)
This option initiates a standard compilation and invokes a full or incremental recompilation as required. If errors are found the executable file will not be built. All errors detected are shown on the screen and put into vec.out file.
p:<FileName>   Precompile cluster. <FileName> contains a library description. This command always produces native code.
f x Enable finalization mode for native code: This option is used together with the /a option to assemble the most optimized version of your project. The compiler uses its default optimization settings, and ignores the settings in the ESD file.
fp x Enable finalization mode for p-code
fe x Stop compilation after first semantically erroneous class. If this option is not set, the compiler will try as many errors as possible.
rp   Removes the project in the current cluster: This operation reverses the options /a and /p and removes a project from the repository. This option is useful when you have to reassemble a precompiled library or the compiler database for the project has become corrupt. This option enables you to start work with your project from scratch.
rl   As rp but for a library

Repository level

Option Toggle Description
cu   Create the repository: This is the first command you have to execute when you start working with Visual Eiffel. The Visual Eiffel compiler can perform its actions only when you have created the repository. A repository is a list of clusters where compiled Eiffel classes are located. The repository is created in the directory indicated by the VE_DATA environment/registry variable.
eu   Erase the repository. This dangerous command removes the compilation database from your disk. This command will remove all projects and precompiled libraries which have been built in the current repository - so a special confirmation is necessary.
l   List the contents of the current repository. Each item is listed as a System, Library or Cluster.
cure   Detects and repairs errors in the repository. Use this command if you encounter unexplained problems, or if you have manually moved or deleted the compilation data files.
eal   Export every precompiled library into an EEXPORT subdirectory.
ral   Remove all precompiled libraries - applies /RL for all precompiled libraries in the repository. This results in all ELIBRARY subdirectories being deleted.

Cluster

Option Toggle Description
ac[:<cluster_path>]   Add the cluster into the repository (this is usually done automatically)
s[:<cluster_path>]   Show cluster contents. It is not necessary for a class to have source code in the cluster, so a list of *.e files would not necessarily show all classes comprising the cluster.
cpt[:<root_class>
[,<executable_name>]]
  Create a project template in the cluster. This option means you don't have to spend time learning the ESD language - just modify the generated ESD file as appropriate for your project.
clt   Create a library template in the cluster
dc[:<cluster_path>]   Delete a cluster from the repository. If this cluster contains a project or library it is also removed. All compiler data files are erased. It is not often necessary to use this option.
rc:<class_name>   Remove the class from the current cluster
ec   Export a cluster or library. The subdirectory EEXPORT is created and the compiler database files are archived there. You can move this EEXPORT subdirectory to another system and recreate the cluster or library with the /ic command.
ic[:<clt_path>]   Import a cluster from an EEXPORT data directory (this directory is produced by the /EC option)

Print

These options are included mainly for debugging purposes (debugging the compiler ;-). In some situations they may be also useful to gather information about your program.

Option Toggle Description
pc x Print all class names from the project context
pcc x Print the flat form for all classes
plc x Print the class names of the library
pff:<class_name>   Print the flat form of the class
pph x Print the parents and heirs
ppo x Print the project options
pffg x This toggle determines whether features declared in class GENERAL should be printed also. By default they are not printed, which generates more compact listings.
pcb[:<class_name>]   Print all callbacks of the class

Print class info

Option Toggle Description
PSC:<class_name>   Prints the class interface of  <class_name>
PD:<class_name>   Prints the documentation

Print Native code

These options are used only in conjunction with the /a or /p commands.

Option Toggle Description
PRTL:<class_name> x Dump the rtl-representation after RTL generation
PLRA:<class_name>   Dump the rtl-representation after local register allocation
PRLD:<class_name>   Dump the rtl-representation after flow analysis
PASM:<class_name>   Compile into assembler code but do not assemble
PBIN:<class_name>   Print the native code for a class

Examples

Example 1.

vec /cu

creates a new repository. This option is used when you start working with Visual Eiffel - after installing Visual Eiffel or after erasing the repository.

Example 2.

vec /a:example.esd

assembles a system described in example.esd. If necessary all .e files in the cluster are parsed. If the cluster in not already in the repository, it is added to it.

Example 3.

vec /a:example.esd /f /pasm:myclass /t

assembles the same system but produces a fully optimized version and prints the generated native code for the class "myclass". In addition, some time statistics are printed.

Example 4.

vec /p:mylib.eld /ec

precompiles the current cluster to native code (all precompiled libraries are in native code) and "exports" all precompilation information so that it can be distributed without source code.


Copyright © Object Tools -- info@object-tools.com
Last updated: 2005/02/02 11:51:34