Next: Target options, Up: Grade options [Contents][Index]
-s grade
--grade grade
Select the compilation model. This model, which Mercury calls a
grade, specifies what properties the resulting executable or
library should have. Properties such as ‘generates profiling data
for mprof
when executed’ and ‘can be debugged with the
Mercury debugger’. As such, it controls decisions that must be made the
same way in all the modules of a program. For example, it does not make
sense to compile some modules of a program to C and some to Java; nor
does it make sense to compile some modules to support profiling and
some to not support profiling.
The grade should consist of one of the base grades ‘none’, ‘reg’, ‘asm_fast’, ‘hlc’, ‘java’, or ‘csharp’, followed by zero or more of the grade modifiers in the following options. The names of all grade modifiers start with a period, so a complete grade name consists of a list of name components (the base grade and some grade modifiers) separated by periods.
Note that not all combinations of components are allowed, and that the Mercury standard library will have been installed on your system in only a subset of the set of all possible grades.
Attempting to build a program in a grade which has not been installed or to link together modules that have been compiled in different grades, will result in an error.