|
"http://www.w3.org/TR/REC-html40/loose.dtd">
Tools
F Tools
F.1 The compiler
General options
The Cyclone compiler has the following command-line options:
-
-help
- Print a short description of the command-line options.
- -v
- Print compilation stages verbosely.
- --version
- Print version number and exit.
- -o file
- Set the output file name to file.
- -Dname
-
Define a macro named name for preprocessing.
- -Dname=defn
-
Give macro name the definition defn in preprocessing.
- -Bdir
-
Add dir to the list of directories to search for special
compiler files.
- -Idir
-
Add dir to the list of directories to search for include files.
- -Ldir
-
Add dir to the list of directories to search for libraries.
- -llib
-
Link library lib into the final executable.
- -c
-
Produce an object (.o) file instead of an executable; do
not link.
- -x language
-
Specify language for the following input files
- -s
-
Remove all symbol table and relocation information from the executable.
- -O
-
Optimize.
- -O2
-
A higher level of optimization.
- -O3
-
Even more optimization.
- -p
-
Compile for profiling with the prof tool.
- -pg
-
Compile for profiling with the gprof tool.
- -pa
-
Compile for profiling with the aprof tool.
- -S
-
Stop after producing assembly code.
- -M
-
Produce dependencies for inclusion in a makefile.
- -MG
-
When producing dependencies assume missing files are generated.
Must be used with -M.
- -MT file
-
Make file be the target of any dependencies generated using
the -M flag.
- -E
-
Stop after preprocessing.
- -nogc
-
Don't link in the garbage collector.
Developer optionsIn addition, the compiler has some options that are primarily of use
to its developers:
-
-g
-
Compile for debugging. This is bulletproof for compiler
developers, as the debugging information reflects the C code that
the Cyclone code is compiled to, and not the Cyclone code itself.
To have a look at Cyclone code during debugging (but not very
cleanly as of yet), also pass in --lineno (see below).
- -stopafter-parse
-
Stop after parsing.
- -stopafter-tc
-
Stop after type checking.
- -stopafter-toc
-
Stop after translation to C.
- -ic
-
Activate the link-checker.
- -pp
-
Pretty print.
- -up
-
Ugly print.
- -tovc
-
Avoid gcc extensions in the C output.
- -save-temps
-
Don't delete temporary files.
- -save-c
-
Don't delete temporary C files.
- --lineno
-
Insert #line directives in generated C code. This slows down
compilation, but helps debugging. Works best when also using
-pp.
- --nochecks
-
Disable all null and array bounds checks (still uses ``fat''
representation of ? pointers).
- --nonullchecks
-
Disable null checks.
- --noboundschecks
-
Disable array bounds checks (still uses ``fat''
representation of ? pointers).
- -use-cpppath
-
Indicate which preprocessor to use.
- -no-cpp-precomp
-
Disable smart preprocessing (mac only).
- -nocyc
-
Don't add the implicit namespace Cyc to variable names in the C output.
- -noremoveunused
-
Don't remove externed variables that aren't used.
- -noexpandtypedefs
-
Don't expand typedefs in pretty printing.
- -printalltvars
-
Print all type variables (even implicit default effects).
- -printallkinds
-
Always print kinds of type variables.
- -printfullevars
-
Print full information for evars (type debugging).
F.2 The lexer generator
F.3 The parser generator
F.4 The allocation profiler, aprofTo get a profile of the allocation behavior of a Cyclone program,
follow these steps:
-
Compile the program with the flag -pa. The resulting
executable will be compiled to record allocation behavior. It will
also be linked with a version of the standard library that records
its allocation behavior. (If you get the message, ``can't find
internal compiler file libcyc_a.a,'' then ask your system
administrator to install the special version of the library.)
- Execute the program as normal. As it executes, it will write to
a file amon.out in the current working directory; if the
file exists before execution, it will be overwritten.
- Run the program aprof. This will examine
amon.out and print a report on the allocation behavior of
the program.
|