mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 13:55:07 +00:00
Estimated hours taken: 5 Branches: main Allow tools/bootcheck to be run using `mmake --use-mmc-make'. The tests don't work yet. compiler/make.m: compiler/make.module_target.m: Handle targets such as `<module>.cs' and `<module>.ints', which are used when building stage 3. Mmake.common.in: */Mmakefile: */Mercury.options: Add Mercury.options files to pass module-specific flags to `mmc --make'. Avoid triggering the .DEFAULT rule introduced with `--use-mmc-make' for optional files like Mmake.params. compiler/modules.m: Build the interface files when building a library in IL grades, for consistency with C grades. library/Mmakefile: Improve performance by removing the dependency on the interface files when building the library. The files are now always built by the libmer_std target. Pass the command to build libmer_std.init to `mmc --make'. tools/bootcheck: Add an option `--use-mmc-make'. Copy the Mercury.options files into the stage2 and stage3 directories. scripts/Mmake.rules: Don't include the rules for `.dep' files with `--use-mmc-make'. Include the rule for `--convert-to-mercury' even with `--use-mmc-make'. compiler/Mmakefile: tools/bootcheck: tools/binary_step: `mmc --make' doesn't handle `<module>_init.c' targets, so don't make the `cs' target depend on `top_level_init.c'. As far as I can tell, that dependency is only present so that the stage2 and stage3 compilers have the same set of C files. bootcheck and binary_step now only compare `.c' files which are present in the stage3 directory.
34 lines
1.4 KiB
Plaintext
34 lines
1.4 KiB
Plaintext
#-----------------------------------------------------------------------------#
|
|
# Copyright (C) 2002 University of Melbourne.
|
|
# This file may only be copied under the terms of the GNU General
|
|
# Public License - see the file COPYING in the Mercury distribution.
|
|
#-----------------------------------------------------------------------------#
|
|
# Mercury.options - module-specific flags for Mmake and `mmc --make'.
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
# Compilation of rl_code.c is really slow (about 26 minutes on traveller with
|
|
# --trace deep) at the default level of -O2, due to the C optimizer's use of
|
|
# quadratic algorithms on a couple of 20,000-line functions (the automatically
|
|
# generated index and compare routines on the bytecode type). The code in this
|
|
# module can't really benefit from those algorithms anyway. With -O1, the 26
|
|
# minutes drops to less than 26 seconds.
|
|
CFLAGS-aditi_backend.rl_code=-O1
|
|
|
|
# process_util.m uses `kill' and `struct sigaction' from <signal.h>,
|
|
# which are not available with `--ansi'.
|
|
MGNUCFLAGS-libs.process_util = --no-ansi
|
|
|
|
# The c_code in the module gcc.m needs the header files from the GNU C
|
|
# distribution.
|
|
CFLAGS-gcc = -DMR_NO_BACKWARDS_COMPAT \
|
|
-DIN_GCC -DHAVE_CONFIG_H \
|
|
-I. \
|
|
-I$(GCC_SRC_DIR)/gcc \
|
|
-I$(GCC_SRC_DIR)/gcc/mercury \
|
|
-I$(GCC_SRC_DIR)/gcc/config \
|
|
-I$(GCC_SRC_DIR)/include \
|
|
-I$(GCC_SRC_DIR)
|
|
# Likewise for mlds_to_gcc.m
|
|
CFLAGS-mlds_to_gcc = $(CFLAGS-gcc)
|
|
|