Next: Options for linking just Java code, Previous: Options for linking C or C# code, Up: Options for linking [Contents][Index]
-o filename--output-file filenameSpecify the name of the final executable. (The default executable name
is the same as the name of the first module on the command line.) This
option is ignored by mmc --make.
--link-object filenameLink with the specified object file, or archive of object files.
--ld-flags optionsSpecify options to be passed to the linker command that will create an
executable. These options will not be quoted when passed to the shell.
Use mmc --output-link-command to find out what the linker
command is.
--ld-flag optionSpecify a single word option to be passed to the linker command that
will create an executable. The word will be quoted when passed to the
shell. Use mmc --output-link-command to find out what the linker
command is.
--ld-libflags optionsSpecify options to be passed to the linker command that will create a
shared library. These options will not be quoted when passed to the
shell. Use mmc --output-shared-lib-link-command to find out what
the linker command is.
--ld-libflag optionSpecify a single word option to be passed to the linker command that
will create a shared library. The word will be quoted when passed to
the shell. Use mmc --output-shared-lib-link-command to find out
what the linker command is.
-R directory--runtime-library-directory directoryAppend directory to the list of directories in which to search for shared libraries at runtime.
--no-default-runtime-library-directoryDo not add any directories to the runtime search path automatically.
--init-file-directory directoryAppend directory to the list of directories to be searched for
.init files by c2init.
--init-file init-fileAppend init-file to the list of .init files to be passed
to c2init.
--trace-init-file init-fileAppend init-file to the list of .init files to be passed
to c2init when tracing is enabled.
--linkage {shared, static}Specify whether to use shared or static linking for executables. Shared libraries are always linked with ‘--linkage shared’.
--mercury-linkage {shared, static}Specify whether to use shared or static linking when linking an executable with Mercury libraries. Shared libraries are always linked with ‘--mercury-linkage shared’.
--no-demangleDo not pipe the output of the linker through the Mercury demangler. The demangler usually makes it easier to understand the diagnostics for any link errors that involve code generated by the Mercury compiler.
--no-stripDo not invoke the strip command on executables. Stripping
minimizes executables’ sizes, but also makes debugging them much
harder.
--no-mainDo not generate a C main() function. With ‘--no-main’, the
user’s own code must provide a main() function.
--no-allow-undefinedDo not allow undefined symbols in shared libraries.
--no-use-readlineDisable use of the readline library in the debugger.
--runtime-flags flagsSpecify flags to pass to the Mercury runtime.
--extra-initialization-functions--extra-initsSearch .c files for extra initialization functions. (This may be
necessary if the C files contain hand-written C code with INIT
comments, rather than containing only C code that was automatically
generated by the Mercury compiler.)
--framework frameworkBuild and link against the specified framework. (Mac OS X only.)
-F directory--framework-directory directoryAppend the specified directory to the framework search path. (Mac OS X only.)
--cstack-reserve-size sizeSet the total size of the C stack in virtual memory for executables. The stack size is given in bytes. This option is only supported (and indeed only necessary) on systems running Microsoft Windows.)
--link-executable-command commandSpecify the command used to invoke the linker when linking an executable.
--link-shared-lib-command commandSpecify the command used to invoke the linker when linking a shared library.
--shlib-linker-install-name-path directorySpecify the path where a shared library will be installed. This option is useful on systems where the runtime search path is obtained from the shared library and not via the ‘-R’ option above (such as Mac OS X).
--strip-executable-command commandSpecify the command used to strip executables if no linker flag to do
so is available. This option has no effect on ml.
--strip-executable-shared-flags optionsSpecify options to pass to the strip executable command when linking against Mercury shared libraries.
--strip-executable-static-flags optionsSpecify options to pass to the strip executable command when linking against Mercury static libraries.
Next: Options for linking just Java code, Previous: Options for linking C or C# code, Up: Options for linking [Contents][Index]