[m-rev.] for review: grade compability tests in .h files

Julien Fischer jfischer at opturion.com
Mon Apr 11 15:17:07 AEST 2016


On Mon, 11 Apr 2016, Zoltan Somogyi wrote:

> On Mon, 11 Apr 2016 13:29:42 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
>> IIRC, the low-level C version of the accurate collector advanced a bit
>> further than that.  (According to the mailing list archives it was
>> possible to build the stage 2 compiler.)
>
>> No, last I checked (quite a while ago) hlc.agc wasn't working.  We
>> certainly don't regularly test it.
>
> OK, so it seems that agc is not ready for users using either the mlds
> or the llds backends; their different levels of unreadyness don't matter
> to users.
>
> In that case, I think the best solution is to NOT to enable the
> commented-out requirement of agc needs mlds, but to simply
> not document agc at all in user-facing documentation, the same way
> we don't document mmos.

I did that for the rest of the system a while ago.  There should now be
no user facing documentation that mentions them (other than anything I
missed).

...

>>>      globals.lookup_bool_option(Globals, low_level_debug, LL_Debug),
>>>      (
>>>          LL_Debug = yes,
>>> +        % XXX This is grade option is supposed to tell the C compiler
>>> +        % (a) to turn on the generation of debugging symbols and
>>> +        % (b) to disable the optimizations that would make the executable
>>> +        % harder to debug in a C debugger such as gdb. However, we don't
>>> +        % pass those options here. Instead, we rely on the --grade option
>>> +        % that we give to mgnuc and ml on their command lines; when they see
>>> +        % the ll_debug grade component, *they* will pass those options onto
>>> +        % the C compiler and linker. Since this is the case, why can't we
>>> +        % make them pass -DMR_LL_DEBUG as well?
>>>          LL_DebugOpt = "-DMR_LL_DEBUG "
>>>      ;
>>>          LL_Debug = no,
>>
>> Passing the value of --cflags-for-debug is handled elsewhere in
>> compile_target_code.m.  The code for gathering together all the grade
>> #defines is separate so that we can implement the --output-grade-defines
>> option.  The expectation for that option is that it will return only
>> macro definitions, not other C compiler flags.
>
> I will update the comment, but --cflags-for-debug only specifies
> what the right C compiler flags ARE; it does not specify WHEN
> they should be used.

The ll_debug component implies the --target-debug option and (when
compiling to C) that says to use the value of --cflags-for-debug.  (For
the C# backend, the option, but not the grade component, means enable C#
debugging.)

...

> Any opinions on the second step above?

Oops, I though I'd responeded to that.  The second step looks fine.

Julien.


More information about the reviews mailing list