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

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Apr 11 14:23:05 AEST 2016



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.
 
> > Alternatively, we could arrange the test setup so that for those
> > tests, we only test the generation of the .c file, not the .o file.
> 
> I think that is the preferable solution for now.

With the above, the question becomes moot; we can leave them
enabled as is, generating .o.
 
> > - Copying each .m file of the library to the compiler directory, the same
> >   way we copy the modules of the mdbcomp library to the deep_profiling
> >   and slice directories.
> > Does anyone object to this choice?
> 
> I don't.

From his second reply it seems Peter doesn't either, so I will do this.

> >      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 rest of the diff looks fine.

Thanks.

Any opinions on the second step above?

Zoltan.



More information about the reviews mailing list