mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 09:53:36 +00:00
Estimated hours taken: 28 Branches: main Change `mmc --make' so that it no longer builds the external foreign object files at the same time as it builds the target object file. This allows one to build on the IL backend where building an external foreign file assembly depends on having all the imported Mercury assemblies built first. Various fixes were also added so that `mmc --make --grade il' could make an executable. compiler/compile_target_code.m: Change il_assemble so that we always build a .dll version irrespective of whether it contains main or not, as MC++ or C# code may refer to the dll. Add Mercury/dlls to the search path for the C# and MC++ compilers. s,/,\\\\,g in the C# filename as the MS C# compiler doesn't understand / as a directory seperator. Add the referenced dlls to the C# compilers command line. Export maybe_pic_object_file_extension. compiler/handle_options.m: Fix a bug where copmute_grade incorrectly generated `hl.il' instead of `il' as the grade name because we weren't always considering the --target option. compiler/make.m: Add to the compilation_task_type type the alternatives foreign_code_to_object_code and fact_table_foreign_code_file. Add to the module_target_type type the alternatives foreign_asm, foreign_object and factt_object. compiler/make.dependencies.m: Add code to handle the new module_target_type alternatives. Add code to build the new alternatives to compilation_task_type. compiler/make.module_target.m: Add rules to build the foreign_code_to_object_code and fact_table_code_to_object_code. compiler/make.program_target.m: Determine the targets needed to be built for all the external foreign files and add them to build target list. compiler/make.util.m: Add code to handle the new module_target_type alternatives. Change write_target_file to output the correct name when building the foreign_asm and foreign_object targets. compiler/modules.m: Move referenced_dlls into the interface for use by `compile_target_code.m'. Don't place dlls in a sub-directory because on the IL backend the dlls are `part' of the executable file. Add a `MkDir' argument to fact_table_file_name which optionally creates a directory to store the generated file_name in. tests/hard_coded/foreign_proc_make.exp: tests/hard_coded/foreign_proc_make.m: tests/hard_coded/foreign_proc_make2.m: Add a test case.
2 lines
3 B
Plaintext
2 lines
3 B
Plaintext
10
|