[m-rev.] for review: start using the new code in file_names.m

Julien Fischer jfischer at opturion.com
Mon Jun 19 21:14:48 AEST 2023


On Mon, 19 Jun 2023, Julien Fischer wrote:

> On Mon, 19 Jun 2023, Zoltan Somogyi wrote:
>
>>  On 2023-06-19 03:13 +02:00 CEST, "Julien Fischer" <jfischer at opturion.com>
>>  wrote:
>>>  That gets us further (i.e. when compiling hello world, hello.obj is now
>>>  successfully created).  The next mismatch is:
>>>
>>>  Uncaught Mercury exception:
>>>  Software Error: predicate
>>>  `parse_tree.file_names.module_name_to_file_name'/9: Unexpected: FILENAME
>>>  MISMATCH 1 for
>>>  ext_other(other_ext("_init.obj"))/newext_target_init_obj(ext_init_obj_obj_opt):
>>>  Mercury\objs\hel
>>>  lo_init.obj vs Mercury\os\hello_init.obj
>>
>>  So the same issue, just with a _init prefix. The attached diff,
>>  which replaces the earlier diff, should fix that. Please try it out.
>
> That doesn't work because the big if-then-else chain handles _init.*
> files (including object files) *before* it gets to the code that handles
> object files. Reordering as per the attached diff works.

The next mismatch after that is:

$ mmc --use-grade-subdirs --make hello
Making Mercury\int3s\hello.int3
Making Mercury\ints\hello.int
Making Mercury\hlc.gc\x86_64-w64-mingw32\Mercury\cs\hello.c
Making Mercury\hlc.gc\x86_64-w64-mingw32\Mercury\os\hello.obj
hello.c
Uncaught Mercury exception:
Software Error: predicate
`parse_tree.file_names.module_name_to_file_name'/9: Unexpected: FILENAME
MISMATCH 1 for
ext_other(other_ext(".exe"))/newext_exec_gs(ext_exec_exec_opt):
Mercury\hlc.gc\x86_64-w64-mingw3
2\Mercury\exes\hello.exe vs
Mercury\hlc.gc\x86_64-w64-mingw32\Mercury\bin\hello.exe

Julien


More information about the reviews mailing list