[m-rev.] for post-commit review: link/search/buildsys
Julien Fischer
jfischer at opturion.com
Tue Jul 1 11:09:08 AEST 2025
On Mon, 30 Jun 2025 at 21:10, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
> Convert link/search/buildsys options to semantic help_pieces.
>
> compiler/options.m:
> As above.
>
> compiler/optdb_help.m:
> compiler/print_help.m:
> Define and implement some new semantic categories,
> to help with the change to options.m.
>
> tests/warnings/help_text.err_exp:
> Expect the updated help texts.
...
> diff --git a/tests/warnings/help_text.err_exp b/tests/warnings/help_text.err_exp
> index a01035521..19d64141e 100644
> --- a/tests/warnings/help_text.err_exp
> +++ b/tests/warnings/help_text.err_exp
> @@ -2710,27 +2710,29 @@ Options for linking
>
> --ld-flags <options>
> --no-ld-flags
> - Specify options to be passed to the linker command invoked by ml to
> + Specify options to be passed to the linker command invoked by `ml' to
> link an executable. These options will not be quoted when passed to the
> - shell. Use `ml --print-link-command' to find out which command is used.
> + shell. Use `ml --print-link-command' to find out what the linker
> + command is.
>
> --ld-flag <option>
> Specify a single word option to be passed to the linker command invoked
> - by ml to link an executable. The word will be quoted when passed to the
> - shell. Use `ml --print-link-command' to find out which command is used.
> + by `ml' to link an executable. The word will be quoted when passed to
> + the shell. Use `ml --print-link-command' to find out what the linker
> + command is.
>
> --ld-libflags <options>
> --no-ld-libflags
> - Specify options to be passed to the linker command invoked by ml to
> + Specify options to be passed to the linker command invoked by `ml' to
> link a shared library. These options will not be quoted when passed to
> - the shell. Use `ml --print-shared-lib-link-command' to find out which
> - command is used.
> + the shell. Use `ml --print-shared-lib-link-command' to find out what
> + the linker command is.
>
> --ld-libflag <option>
> Specify a single word option to be passed to the linker command invoked
> - by ml to link a shared library. The word will be quoted when passed to
> - the shell. Use `ml --print-shared-lib-link-command' to find out which
> - command is used.
> + by `ml' to link a shared library. The word will be quoted when passed
> + to the shell. Use `ml --print-shared-lib-link-command' to find out what
> + the linker command is.
This is an existing problem ...
Are the values of any of the above actually passed to the ml script? Their only
use appears to be in compiler/link_target_code.m, which suggests that this
is *not* the case to me.
In any case, I would suggest removing all references to the ml script above,
since all of those options are definitely used in the case where we invoke the
linker directly.
ml --print-link-command can be replaced by mmc --output-link-command
ml --print-shared-lib-link-command can be replaced by mmc
--output-shared-lib-link-command.
The rest of the diff looks fine.
Julien.
More information about the reviews
mailing list