mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 23:35:25 +00:00
Estimated hours taken: 2 Add support to `ml' for creating and using shared libraries. scripts/ml.in: - Change the `--shared' option so that it does not pass `-shared' to $CC. This is because passing `-shared' to gcc would have the effect of *creating* a shared library, but ml's documentation for `--shared' says that it means the generated executable should *use* shared libs. Also rename the variable $SHARED_OR_STATIC_OPT as $MAYBE_STATIC_OPT, since the previous name was now misleading. - Add a new option `--make-shared-lib', for creating shared libraries. This is to allow users to create their own shared libraries. - Add a new option `-R<dir>' / `--shared-lib-directory', that adds a directory to the RPATH used by the dynamic linker to search for shared libraries. This is to allow users to link in their own shared libraries.