27.7 : Execution options
-G run Compile the program to machine code, and then run it.
The executable file is removed afterwards unless the -Fx option
is present.
-G interp Translate the program to Foam code, and then run it in interpreted mode.
The .ao file is removed afterwards unless the -Fao option
is present.
-G loop Run interactively, interpreting each expression typed by the user.
With this option, the file aldorinit.as is used for initialization.
-E fn Use the input file fn.* as the main entry point.
The default is the first file. -E is useful only with -Fx,
-Grun or -Ginterp.
27.8 : Optimization options
Combinations can be used, e.g. -OQno-cc or -Qno-all -Qcc.
The default is -Qcfold -Qdeadvar -Qpeep.
The option -Qcc may exclude -[gp] on some platforms.
-O Optimize. This is equivalent to -Q2.
-Q n Select a level of code optimization. (default is -Q1).
-Q opt Turn on an optimization opt from the list below.
-Q no-opt Turn off an optimization opt from the list below.
Q0 Q1 Q2 Q3
-Q all All supported optimizations. X
-Q inline Allow open coding of functions. X X
-Q inline-all Allow open coding of any functions. X
-Q inline-limit=n Set maximum acceptable increase in code size from inlining to n. 1.0 1.0 5.0 6.0
-Q cfold Evaluate non floating point constants at compile time. X X X
-Q ffold Evaluate floating point constants at compile time. X X
-Q hfold Determine, where possible, the run time hash code
which domains will have, reducing the number of domain instantiations
and speeding up cross-file look-ups. X X X
-Q peep Local ``peep-hole'' optimizations. X X X
-Q deadvar Eliminate unused variables and values. X X X
-Q emerge Combine lexical levels and records. X X
-Q cprop Copy propagation. X X
-Q cse Common sub-expression elimination. X X
Q0 Q1 Q2 Q3
-Q flow Simplify computed tests and jumps. X X
-Q cast Reduce the number of casts. X X
-Q cc Use the C compiler's optimizer. X X
Combinations can be used, e.g. -Q3 -Qno-ffold.
The option -Qcc may exclude -Z on some platforms.
27.10 : C code generation options
Control the behaviour of -F c, the option for generating C code.
-C standard Generate ANSI/ISO standard C (the default).
-C old Generate old (Kernighan & Ritchie) C.
The options -Cstandard and -Cold are mutually exclusive.
-C comp=name Use name instead of the default C compiler driver unicl. Use -v to see how the driver is invoked.
-C link=name Use name instead of the default linker driver unicl.
Use -v to see how the driver is invoked.
-C cc=name Use name instead of the default C compiler and linker driver unicl.
Without this option, the environment variable CC is tried.
Use -v to see how the driver is invoked.
-C go=name Use name to run the output of the linker.
Without "-Cgo=", the environment variable CGO is tried.
Use -v to see how the driver is invoked.
Most implementations don't need this.
-C args=opts Pass opts as options to the C compiler and linker.
Use -v to see how the driver is invoked.
-C smax=n Try to put no more than n statements per file,
if necessary splitting the generated file into:
name.h, name.c, name001.c, name002.c, etc.
Using -C smax=0 turns off file splitting.
(default: smax=2000)
-C idlen=n Set the maximum length of C identifiers to be n.
Using -C idlen=0 turns off identifier truncation. (default: idlen=32)
-C [no-]idhash (Do not) use hash codes in global C identifiers. (default: idhash)
-C [no-]lines Preserve Aldor source line numbers in generated C. (default: no-lines)
-C sys=name Pass -Wsys=name to the C compiler and linker.
This option is interpreted by unicl to select a group
of options defined in its configuration file aldor.conf.
It also prepends to the list of library directories a modified list
in case there is a special implementation for the particular name.
This is of great help when making libraries for specific flavours
of CPU.
-C runtime=id1,... Select a list of libraries libid1.a, libid2.a etc.
that implement the runtime system.
Default is foam.
-C fortran Pass -Wfortran to link driver unicl which enables fortran options
such as fortran runtime libraries.
-C lib=name Link with the library libname.a
27.11 : Lisp code generation options
Control the behavior of -F lsp.
-S common Produce Common Lisp code (the default).
-S standard Produce Standard Lisp code.
-S scheme Produce Scheme code.
The options -Scommon, -Sstandard and -Sscheme
are mutually exclusive.
-S ftype=ft Use ft as the file extension for the generated lisp file
(default: "-Sftype=lsp").
27.12 : Message options
-M emax=n Stop after n error messages. (default: 10)
-M db=fn Use fn as the message database. (default: no-db)
-M msgname Turn on warning or remark named msgname.
Use -Mname (described below) to find out the names of messages.
-M no-msgname Turn off warning or remark named msgname.
-M n Control how much detail is given. (default: -M2)
-M no-opt Turn of -M opt.
M0 M1 M2 M3
-M warnings Display warnings. N Y Y Y
-M source Display the program lines for messages. N N Y Y
-M details Display details. N N Y Y
-M notes Display cross reference notes. N N Y Y
-M remarks Display remarks. N N N Y
-M sort Sort messages by source position. Y Y Y Y
-M mactext Point to macro text, rather than use. Y Y Y Y
-M abbrev Abbreviate types in messages. Y Y Y Y
-M human Human-oriented format. Y Y Y Y
-M name Show the name of each message as well as the message itself. N N N N
-M antiques Display warnings for old-style code. N N N N
-M preview Display messages as they occur. N N N N
-M inspect Use interactive inspector for errors. N N N N
27.13 : Developer options
Developer options (subject to change):
-W check Turn on internal safety checks.
-W runtime Produce code suitable for the runtime system.
-W nhash Assume all exported types have constant hashcodes.
-W loops Always inline generators when possible.
-W missing-ok Do not stop the compiler if an export is missing in a domain.
-W audit Set maximum Foam auditing level.
-W trap Trap failure exits (for debugging Aldor).
-W gc Garbage collect as needed (if gc is available).
-W gcfile Garbage collect after each file (if gc is available).
-W sexpr Run a read-print loop.
-W seval Run a read-eval-print loop.
-W test=name Run compiler self-test name.
Use -W test+show to see a list of self-tests.
-W D+name Turn on debug hook name.
Use -W D+show to see a list of debug hooks.
-W D-name Turn off debug hook name.
Use -W D+show to see a list of debug hooks.
-W Tapdrgst0+ph Phase tracing:
Several phases can be given as "ph1+ph2+ph3" or "all".
Several options can be given at once, e.g. "-WTags+all".
Compile a file with "-v" to see the phase abbreviations.
The remaining options give more details about the trace code letters.
-WTa+ph Announce entry to ph.
-WTp+ph Pretty print result of ph.
-WTd+ph Print debug information for ph.
-WTr+ph Show result of ph.
-WTg+ph Garbage collect after ph.
-WTs+ph Storage audit after ph.
-WTt+ph Terminate after ph.
-WT0+ph Ignore earlier -WT option for ph.
27.14 : Environment variables
Sometimes there are certain aspects of the compiler's behaviour
which you may wish to change for most of your compilations.
Most operating systems have some notion of environment variables
and the Aldor compiler checks a number of these to guide its actions.
None of these needs to be defined, but if they are the Aldor compiler
will use them.
ALDORROOT This gives a directory under which the compiler will find its own
include files, libraries, etc.
ALDORARGS This provides options to the compiler which are treated before those
appearing on the command line.
INCPATH This gives the compiler additional places to search for include files.
The syntax is according to the operating system's conventions.
For example, on Unix a suitable initialization could be
setenv INCPATH "/u/jane/myincludes:.:/usr/applications/include"
This has the same effect as using the command line options
-I/u/jane/myincludes -I. -I/usr/applications/include
LIBPATH This gives the compiler additional places to search for libraries.
CC This gives the Aldor compiler the name of a C compiler which
it should call to generate and link object code.
The default is unicl -- a program provided in the Aldor
distribution to convert C compile command lines to the native system syntax.
CGO This gives the Aldor compiler the name of a loader which it should
call to run an executable program it has generated. On most platforms no explicit loader is needed.
Sometimes you will wish to specify
CC and
CGO together. For example on DOS using the
djgpp port of GCC, a useful combination is
set CC=gcc
set CGO=go32