Next: , Up: Compilation model options   [Contents][Index]


9.8.1 Grades and grade components

-s grade
--grade grade

Select the compilation model. The grade should be a ‘.’ separated list of the grade options to set. The grade options may be given in any order. The available options each belong to a set of mutually exclusive alternatives governing a single aspect of the compilation model. The set of aspects and their alternatives are:

What target language to use, what data representation to use, and (for C) what combination of GNU C extensions to use:

none’, ‘reg’, ‘jump’, ‘asm_jump’, ‘fast’, ‘asm_fast’, ‘hl’, ‘hlc’, ‘il’, ‘csharp’, ‘java’ and ‘erlang’ (the default is system dependent).

What garbage collection strategy to use:

gc’ (the default is no garbage collection).

What kind of profiling to use:

prof’, ‘memprof’, and ‘profdeep’ (the default is no profiling).

Whether to enable the trail:

tr’ and ‘trseg’ (the default is no trailing).

Whether to use single-precision representation of floating point values:

spf’ (the default is to use double-precision floats)

Whether to use dynamically sized stacks that are composed of

small segments: ‘stseg’ (the default is to used fixed size stacks)

What debugging features to enable:

debug’ and ‘decldebug’ (the default is no debugging features).

Whether to use a thread-safe version of the runtime environment:

par’ (the default is a non-thread-safe environment).

Whether to include support for profiling of parallel programs:

threadscope’ (the default is no support for profiling parallel programs).

Whether to include support for minimal model evaluation of procedures:

mm’ (the default is no support for minimal model evaluation).

The default grade is system-dependent; it is chosen at installation time by ‘configure’, the auto-configuration script, but can be overridden with the environment variable MERCURY_DEFAULT_GRADE if desired. Depending on your particular installation, only a subset of these possible grades will have been installed. Attempting to use a grade which has not been installed will result in an error at link time. (The error message will typically be something like ‘ld: can't find library for -lmercury’.)

The tables below show the options that are selected by each base grade and grade modifier; they are followed by descriptions of those options.

Grade

Options implied.

none

--target c --no-gcc-global-registers --no-gcc-nonlocal-gotos --no-asm-labels.

reg

--target c --gcc-global-registers --no-gcc-nonlocal-gotos --no-asm-labels.

asm_fast

--target c --gcc-global-registers --gcc-nonlocal-gotos --asm-labels.

hlc

--target c --high-level-code.

csharp

--target csharp --high-level-code --high-level-data.

java

--target java --high-level-code --high-level-data.

erlang

--target erlang.

.gc

--gc boehm.

.prof

--profiling.

.memprof

--memory-profiling.

.profdeep

--deep-profiling.

.tr

--use-trail --no-trail-segments.

.trseg

--use-trail --trail-segments.

.spf

--single-prec-float

.stseg

--stack-segments

.debug

--debug.

.decldebug

--decl-debug.

.par

--parallel.

.threadscope

--threadscope.


Next: , Up: Compilation model options   [Contents][Index]