Next: , Previous: , Up: Invocation   [Contents][Index]


9.4 Options that give the compiler its overall task


-f
--generate-source-file-mapping

Output to Mercury.modules the module-name-to-file-name mapping for the list of source files given as non-option arguments to mmc. This mapping is needed if either for some modules, the file name does not match the module name, or if some of the modules are outside the current directory. In such cases, the mapping must be generated before invoking any one of mmc --generate-dependencies, mmc --make, or mmake depend.


-M
--generate-dependencies

Output “Make”-style dependencies for the given main module, and all the other modules in the program (i.e. all the other modules in this directory that the main module imports either directly or indirectly) to module.dep, to module.dv, and to the .d files of all the modules in the program.


--generate-dependencies-ints

Do the same job as –generate-dependencies, but also output .int3, .int0, .int and .int2 files for all the modules in the program.


--generate-dependency-file

Output “Make”-style dependencies for the given module to module.d.


--make-short-interface
--make-short-int

Write to module.int3 a list of the types, insts, modes, typeclasses and instances defined in the interface section of the named module. The compiler uses these files to create .int0, .int and .int2 files.


--make-private-interface
--make-priv-int

Write to module.int0 the list of the entities (including types, insts, modes, predicates and functions) defined in the given module that its submodules have access to. (This will include even entities that are not exported from the module.) Besides the code of the module itself, the inputs to this task are the .int0 files of the given module’s own ancestor modules, and the .int3 files of the modules it imports directly or indirectly. Note that this command is unnecessary for modules that have no submodules.


-i
--make-interface
--make-int

Write to module.int and to module.int2 a list of entities (including types, insts, modes, predicates and functions) that the given module exports for use by other modules. When generating code, the compiler reads the .int file of every directly imported module, and the .int2 file of every indirectly imported module. (Each .int2 file is a slightly shorter version of the corresponding .int file, because it is specialized for its intended use.)


--make-optimization-interface
--make-optimisation-interface
--make-opt-int

Write to module.opt information about the semantically-private parts of the named module that can be useful when optimizing another module that imports this one. Note that .opt files are used by ‘--intermodule-optimization’.


--make-transitive-optimization-interface
--make-transitive-optimisation-interface
--make-trans-opt

Write to module.trans_opt information about the named module that can be useful when optimizing another module that imports this one. The distinction from .opt files is that a .trans_opt file can include information not just from the source code of its module, but also from the .opt and .trans_opt files of other modules. Note that .trans_opt files are used by ‘--transitive-intermodule-optimization’.


-t
--typecheck-only

Check the module’s code only for syntax- and type errors. Do not execute any other semantic checks, and do not generate any code. (When converting Prolog code to Mercury, it can sometimes be useful to get the types right first and worry about modes second; this option supports that approach.)


-e
--errorcheck-only

Check the module’s code for syntax- and semantic errors, but do not generate any code.


-C
--target-code-only

Generate target code (meaning C code in module.c, C# code in module.cs, or Java code in module.java), but do not generate object code.


-c
--compile-only

Generate C code in module.c and object code in module.o, but do not attempt to link the object files.


--generate-standalone-interface basename
–no-generate-standalone-interface

Output a stand-alone interface. Use basename as the basename of any files generated for the stand-alone-interface. (See Stand-alone interfaces for further details.)


-P
--convert-to-mercury
--convert-to-Mercury
--pretty-print

Output the code of the module to module.ugly in a standard format. This option acts as a Mercury ugly-printer. (It would be a pretty-printer, except that comments are stripped, and nested if-then-elses are indented too much, so the result is rather ugly.)


-x
--make-xml-documentation
--make-xml-doc

Output an XML representation of all the declarations in the module to module.xml. This XML file can then be transformed via a XSL transform into another documentation format.


-m
--make

Treat the non-option arguments to mmc as files to make, rather than source files. Build or rebuild the specified files if they do not exist or are not up-to-date. Note that this option also enables ‘--use-subdirs’.


-r
--rebuild

A variant of the ‘--make’ option, with the difference being that it always rebuilds the target files, even if they are up-to-date.


--output-grade-string

Print to standard output the canonical string representing the currently selected grade.


--output-grade-defines

Print to standard output the C compiler flags that define the macros which specify the selected compilation grade.


--output-stdlib-grades

Print to standard output the list of compilation grades in which the Mercury standard library is available with this compiler.


--output-stdlib-modules

Print to standard output the names of the modules in the Mercury standard library.


--output-libgrades
--output-library-install-grades

Print to standard output the list of compilation grades in which a library to be installed should be built.


--output-target-arch

Print to standard output the target architecture.


--output-cc

Print to standard output the command for invoking the C compiler.


--output-c-compiler-type
--output-cc-type

Print to standard output the C compiler’s type.


--output-cflags

Print to standard output the flags with which the C compiler will be invoked.


--output-c-include-directory-flags
--output-c-include-dir-flags

Print to standard output the C compiler flags that specify which directories to search for C header files. This includes the C header files from the standard library.


--output-link-command

Print to standard output the link command used to create executables.


--output-shared-lib-link-command

Print to standard output the link command used to create shared libraries.


--output-library-link-flags

Print to standard output the flags that must be passed to the linker in order to link against the current set of libraries. This includes the Mercury standard library, as well as any other libraries specified via either the ‘--ml’ or ‘-l’ option.


--output-csharp-compiler

Print to standard output the command for invoking the C# compiler.


--output-csharp-compiler-type

Print to standard output the C# compiler’s type.


--output-java-class-directory
--output-class-directory
--output-java-class-dir
--output-class-dir

Print to standard output the name of the directory in which the compiler will place any generated Java class files.


--output-optimization-options
--output-opt-opts

Print to standard output a list of the optimizations enabled at each optimization level.


--output-optimization-options-upto max_level
--output-opt-opts-upto max_level

Print to standard output a list of the optimizations enabled at each optimization level up to the given maximum.


Next: , Previous: , Up: Invocation   [Contents][Index]