[m-rev.] for post-commit review: --c-incl-dir-external

Julien Fischer jfischer at opturion.com
Sun Dec 22 15:04:56 AEDT 2024


On Sun, 22 Dec 2024 at 10:48, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:

> Add --c-incl-dir-external.
>
> compiler/options.m:
> doc/user_guide.texi:
>     Add this new option, as discussed on m-rev.
>
>     Clarify the nature of arguments naming workspace and installed library
>     directories in related options.
>
> compiler/globals.m:
> compiler/handle_options.m:
>     Add a new slot in the extension dirs maps for the new option,
>     and fill that slot. (The slot is not yet used.)

...

> diff --git a/doc/user_guide.texi b/doc/user_guide.texi
> index bcb3806ea..ced124311 100644
> --- a/doc/user_guide.texi
> +++ b/doc/user_guide.texi
> @@ -10094,13 +10099,20 @@ to a sequence of @samp{--c-include-directory} options.
>  @c named in @var{--c-include-dir-same-workspace} options,
>  @c second it will search the workspace directories
>  @c named in @var{--c-include-dir-independent-workspace} options,
> - at c and third it will search the library install directories
> + at c third it will search the library install directories
>  @c named in @var{--c-include-dir-installed-library} options
> + at c (or its abbreviated synonym),
> + at c and fourth it will search the directories
> + at c named in @var{--c-include-dir-external} options

There is a distinction: *it* here is the Mercury compiler -- the start of
that paragraph is not included in the diff.  While the Mercury compiler will
search directories given by the first three options, it won't search those
directories named by --c-incl-dir-external options. It will simply tell the
C compiler to do that.

>  @c (or its abbreviated synonym).
>  @c
> - at c XXX Should we add something to specify that unlike the legacy options,
> - at c the arguments of these options never require any directory name components
> - at c that would be added by --use-subdirs/--use-grade-subdirs?
> + at c Note that
> + at c the @var{workspace_directory} and @var{install_directory} arguments
> + at c should name directories that contain a @samp{MercurySystem} directory.

I suggest adding that the argument does not need to contain the MercurySystem
component itself.

That looks fine otherwise.

Julien.


More information about the reviews mailing list