The compiler

You can use the compiler in much the same way as gcc. To compile a file foo.cyc that includes a main() function,

cyclone foo.cyc

This will compile and link the Cyclone file foo.cyc, and produce an executable file, a.out. If you want to give the executable a different name, use the -o option:

cyclone -o foo foo.cyc

Here, the executable will be named foo instead of a.out.

If you want to compile a Cyclone file that does not include a main() funcion, use the -c flag:

cyclone -c bar.cyc

This will compile bar.cyc to the object file bar.o. No linking is done. Link a bunch of object files like this:

cyclone -o foo foo.o bar.o

The compiler has a host of other options, which you can view using the -usage flag:

cyclone -usage

The options as of this writing are

-v          print compilation stages verbosely
--version   Print version information and exit
-o <file>   Set the output file name to <file>
            Pass definition to preprocessor
-B<file>    Add to the list of directories to search for compiler files
-I<dir>     Add to the list of directories to search for include files
-L<dir>     Add to the list of directories for -l
-l<libname> Library file
-m<option>  GCC specific: pass machine-dependent flag on to gcc
-c          Produce an object file instead of an executable; do not
-x <language>
            Specify <language> for the following input files
-pa         Compile for profiling with aprof
-S          Stop after producing assembly code
-M          Produce dependencies
-MG         When producing dependencies assume that missing files are
-MT <target>
            Give target for dependencies
-b<machine> Set target machine
            Try to warn when a unique pointer might get lost
-Woverride  Warn when a local variable overrides an existing variable
-Wall       Turn on all warnings
-E          Stop after preprocessing
            Stop after parsing
            Stop after type checking
-noprint    Do not print output (when stopping early)
            Stop after control-flow checking
            Stop after translation to C
-ic         Activate the link-checker
-pp         Pretty print the C code that Cyclone generates
-up         Ugly print the C code that Cyclone generates (default)
            Avoid statement expressions in C output (implies
            Do not avoid statement expressions in C output
-un-gcc     Avoid gcc extensions in C output (except for attributes)
-c-comp <compiler>
            Produce C output for the given compiler
-save-temps Don't delete temporary files
-save-c     Don't delete temporary C files
--nolineno  Don't generate line numbers for debugging (automatic with
--nochecks  Disable bounds/null checks
            Disable null checks
            Disable bounds checks
            Indicate which preprocessor to use
            Don't do smart preprocessing (mac only)
-nocyc      Don't add implicit namespace Cyc
-nogc       Don't link in the garbage collector
            Don't remove externed variables that aren't used
            Don't expand typedefs in pretty printing
            Print all type variables (even implicit default effects)
            Always print kinds of type variables
            Print full information for evars (type debugging)
            Print effects for functions (type debugging)
            Do not use compiler special file cyc_setjmp.h
            Compile using the special boot library instead of the
            standard library
-CI <file>  Set cyc_include.h to be <file>
            Warn when bounds checks can't be eliminated
            Warn when any null check can't be eliminated
            Warn when any alias coercion is inserted
            Warn when any region coercion is inserted
-noregister Treat register storage class as public
            Try to give more detailed location information for errors
-port       Suggest how to port C code to Cyclone
-noregions  Generate code that doesn't use regions
            Specify <prefix> as the prefix for subsequent -iwithprefix
            Add <prefix>/<dir> to the second include path.
            Add <prefix>/<dir> to the main include path.
            Add <dir> to the beginning of the second include path and
            treat it as a
system directory.
            Add the directory to the second include path.
            Generate interface files
--interface <file>
            Set the interface file to be <file>.
            don't stop after only a few errors.
            print the parse state and token on a syntax error
            do not assume that unknown flags should be passed to gcc
-help       print out the available options
-usage      print out the available options
-no-seq-c   Do not force left-to-right evaluation order of generated
            code (unsafe)
-pg         Compile for profiling with gprof
--novcgen   do not compute verification-conditions
            instantiate type variables instead of introducing new ones
            Stop after currrgn
--allpaths  analyze all forward paths in verification-condition
            merge paths at join-points within the
            verification-condition generator
-noreaps    Generate code that doesn't use reaps
            print assertions that were unprovable
            controls the maximum size of post-conditions inlined by
            controls the maximum number of paths explored by constraint
--inf       Use interprocedural type inference
--nomerge   Do not merge multiple files into one
--resolve   Resolve constraint variables
--ovfat     Override '?' annotations in the source with constraint
--infstats  Dump statistics for the result of inference -- reads
--tags      Generate a TAGS file for use with interprocedural type
            controls the maximum size of terms considered by the
            constraint solver
            Warn when an assert might fail at run-time
-infpfx <dir>
            Give a directory within which inference temporary files
            will be stored.