Using the |
The basic procedure for compiling and running a
|
This will create a binary toto which can be run using
|
This method still works if the program toto.mmx
depends on many other files. In that case
|
Whenever the user develops another program booh.mmx with an overlapping set of dependencies with toto.mmx, then compiling both programs toto.mmx and booh.mmx will compile the overlapping dependencies only once (or at most once, in case of recompilations).
In order to avoid unnecessary recompilations, the compiler uses a cache, which is stored by default in the directory ~/.mathemagix/mmc or ~/.mathemagix/mmc-version. Sometimes, you may wish to clean the cache and recompile all dependencies from scratch. This can be done using
|
This kind of cleaning may also be necessary whenever you replace your compiler by a newer development version.
The compiler only supports few global flags to influence the
compilation process. On the one hand, this is important in order to
take optimal advantage out of the compiler cache, and thus make the
compilation process as fast as possible. On the other hand this is
part of the general design philosophy of
General purpose compiler flags are the following:
This flag is used for the generation of optimized (but possibly larger) code.
This flag should be used in order to
generate code which can be debugged using
This flag should be used for the creation of static binaries.
The compiler supports a few other general purpose options:
This option will print messages issued by the compiler using colors.
For debugging purposes, it is sometimes useful to inspect the contents of intermediate files which are generated by the compiler. This can be done using the following options:
Any C++ files which are kept in this way may be edited by the user. In order to resume the compilation process from these modified versions, you may use the option –from-cpp.
Hackers may also want to experiment with various debugging options for the compiler itself. These options are all of the form –debug-feature. Currently supported debugging options are: