Files
mercury/compiler/Mercury.options
Julien Fischer 2a366cf295 Deprecate --no-ansi and --no-ansi-c.
--no-ansi (mgnuc) and --no-ansi-c (mmc) have not actually done anything for
many years now. Deprecate these options and remove their "use" throughout most
of the Mercury system. (The remaining uses are in the Makefiles for the Boehm
GC, which need to be updated separately.)

Also deprecate the internal compiler option --cflags-for-ansi.

compiler/options.m:
    Document that --no-ansi-c is now deprecated.

    Document that the internal option --cflags-for-ansi is now
    deprecated.

compiler/compile_target_code.m:
    Do not pass the ANSI options to the C compiler.

scripts/mgnuc.in:
scripts/mgnuc_file_opts.sh-subr:
    Deprecate the --no-ansi option; delete code that no longer does
    anything useful.

configure.ac:
    Delete the configuration variable CFLAGS_FOR_ANSI; it is only ever
    set to be empty. (The comment talks about --no-ansi doing other things
    in the mgnuc script. It used to also cause some preprocessor macros
    to be defined for compatibility with the system headers on some
    platforms -- that has not been the case since 2013.)

doc/user_guide.texi:
    Document that --no-ansi-c is deprecated.

bytecode/Mmakefile:
compiler/Mercury.options:
library/Mercury.options:
extras/odbc/odbc.m:
runtime/Mmakefile:
scripts/Mercury.config.bootstrap.in:
scripts/Mercury.config.in:
tests/hard_coded/Mercury.options:
tests/valid/Mercury.options:
trace/Mmakefile:
util/Mmakefile:
    Conform to the above change.

NEWS.md:
    Announce the above.
2023-05-31 17:44:26 +10:00

150 lines
9.1 KiB
Plaintext

#-----------------------------------------------------------------------------#
# Copyright (C) 2002-2009 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'.
#-----------------------------------------------------------------------------#
# llds_out.m contains some sanity checking code that is usually turned off.
# However, the cost of checking whether they are turned off exceeds the cost of
# performing them, unless inlining is enabled.
MCFLAGS-ll_backend.llds_out = --inlining
# Several predicates in quantification.m contain an argument which is needed
# only to select the right mode. We want to make sure that we don't take up
# code space or execution time to pass these arguments.
MCFLAGS-hlds.quantification = --optimize-unused-args
# Delete the code that computes information needed only in trace goals
# in the common case that the trace goals are not enabled.
# typecheck_module_one_iteration should be tail recursive.
MCFLAGS-check_hlds.typecheck = --unneeded-code --optimize-constructor-last-call
# compute_goals_purity should be tail recursive.
MCFLAGS-check_hlds.purity = --optimize-constructor-last-call
# module_qualify_items_loop should be tail recursive.
MCFLAGS-parse_tree.module_qual.qualify_items = --optimize-constructor-last-call
# The predicates in these modules that could be transformed by lcmc
# are not speed-critical.
MCFLAGS-backend_libs.base_typeclass_info = --no-optimize-constructor-last-call
MCFLAGS-backend_libs.compile_target_code = --no-optimize-constructor-last-call
MCFLAGS-backend_libs.export = --no-optimize-constructor-last-call
MCFLAGS-backend_libs.interval = --no-optimize-constructor-last-call
MCFLAGS-backend_libs.matching = --no-optimize-constructor-last-call
MCFLAGS-backend_libs.saved_vars = --no-optimize-constructor-last-call
MCFLAGS-bytecode_backend.bytecode_gen = --no-optimize-constructor-last-call
MCFLAGS-check_hlds.ordering_mode_constraints \
= --no-optimize-constructor-last-call
MCFLAGS-check_hlds.post_typecheck = --no-optimize-constructor-last-call
MCFLAGS-check_hlds.type_constraints = --no-optimize-constructor-last-call
MCFLAGS-hlds.assertion = --no-optimize-constructor-last-call
MCFLAGS-hlds.error_msg_inst = --no-optimize-constructor-last-call
MCFLAGS-hlds.hhf = --no-optimize-constructor-last-call
MCFLAGS-parse_tree.error_util = --no-optimize-constructor-last-call
MCFLAGS-parse_tree.prog_ctgc = --no-optimize-constructor-last-call
MCFLAGS-parse_tree.prog_data_foreign = --no-optimize-constructor-last-call
MCFLAGS-transform_hlds.ctgc.structure_reuse.analysis \
= --no-optimize-constructor-last-call
MCFLAGS-transform_hlds.ctgc.structure_reuse.direct.choose_reuse \
= --no-optimize-constructor-last-call
MCFLAGS-transform_hlds.ctgc.structure_reuse.indirect \
= --no-optimize-constructor-last-call
MCFLAGS-transform_hlds.ctgc.structure_reuse.lbu \
= --no-optimize-constructor-last-call
MCFLAGS-transform_hlds.ctgc.structure_reuse.lfu \
= --no-optimize-constructor-last-call
MCFLAGS-transform_hlds.ctgc.structure_reuse.versions \
= --no-optimize-constructor-last-call
MCFLAGS-transform_hlds.rbmm.condition_renaming \
= --no-optimize-constructor-last-call
MCFLAGS-transform_hlds.rbmm.execution_path \
= --no-optimize-constructor-last-call
MCFLAGS-transform_hlds.size_prof = --no-optimize-constructor-last-call
MCFLAGS-transform_hlds.stm_expand = --no-optimize-constructor-last-call
MCFLAGS-transform_hlds.table_gen = --no-optimize-constructor-last-call
# In these files, some imports are needed only in some grades.
# Until unused_imports.m can avoid generating messages about these,
# disable the pass on these files.
MCFLAGS-libs.md5 = --no-warn-unused-imports
MCFLAGS-libs.process_util = --no-warn-unused-imports
MCFLAGS-make.build = --no-warn-unused-imports
MCFLAGS-check_hlds.modes = --inline-vars-threshold 10000
MCFLAGS-check_hlds.unique_modes = --inline-vars-threshold 10000
MCFLAGS-make.util += --no-halt-at-warn
MCFLAGS-backend_libs.bytecode_data += --no-warn-implicit-stream-calls
MCFLAGS-bytecode_backend.bytecode += --no-warn-implicit-stream-calls
MCFLAGS-bytecode_backend.bytecode_gen += --no-warn-implicit-stream-calls
MCFLAGS-check_hlds.abstract_mode_constraints += --no-warn-implicit-stream-calls
MCFLAGS-check_hlds.build_mode_constraints += --no-warn-implicit-stream-calls
MCFLAGS-check_hlds.mcsolver += --no-warn-implicit-stream-calls
MCFLAGS-check_hlds.mode_constraint_robdd += --no-warn-implicit-stream-calls
MCFLAGS-check_hlds.mode_constraints += --no-warn-implicit-stream-calls
MCFLAGS-check_hlds.old_type_constraints += --no-warn-implicit-stream-calls
MCFLAGS-check_hlds.ordering_mode_constraints += --no-warn-implicit-stream-calls
MCFLAGS-check_hlds.prop_mode_constraints += --no-warn-implicit-stream-calls
MCFLAGS-hlds.hlds_error_util += --no-warn-implicit-stream-calls
MCFLAGS-hlds.inst_graph += --no-warn-implicit-stream-calls
MCFLAGS-make.build += --no-warn-implicit-stream-calls
MCFLAGS-make.dependencies += --no-warn-implicit-stream-calls
MCFLAGS-make.module_dep_file += --no-warn-implicit-stream-calls
MCFLAGS-make.module_target += --no-warn-implicit-stream-calls
MCFLAGS-make.program_target += --no-warn-implicit-stream-calls
MCFLAGS-make.top_level += --no-warn-implicit-stream-calls
MCFLAGS-make.track_flags += --no-warn-implicit-stream-calls
MCFLAGS-make.util += --no-warn-implicit-stream-calls
MCFLAGS-mode_robdd.implications += --no-warn-implicit-stream-calls
MCFLAGS-parse_tree.error_util += --no-warn-implicit-stream-calls
MCFLAGS-parse_tree.find_module += --no-warn-implicit-stream-calls
MCFLAGS-parse_tree.grab_modules += --no-warn-implicit-stream-calls
MCFLAGS-parse_tree.prog_ctgc += --no-warn-implicit-stream-calls
MCFLAGS-parse_tree.read_modules += --no-warn-implicit-stream-calls
MCFLAGS-top_level.mercury_compile_main += --no-warn-implicit-stream-calls
MCFLAGS-transform_hlds.direct_arg_in_out += --no-warn-implicit-stream-calls
MCFLAGS-transform_hlds.ctgc.structure_reuse.direct \
+= --no-warn-implicit-stream-calls
MCFLAGS-transform_hlds.ctgc.structure_reuse.versions \
+= --no-warn-implicit-stream-calls
MCFLAGS-transform_hlds.ctgc.structure_sharing.analysis \
+= --no-warn-implicit-stream-calls
# These modules call predicates that write out error_specs without
# specifying the stream to write to, which have now been marked as obsolete.
MCFLAGS-check_hlds.ordering_mode_constraints += --no-warn-obsolete
MCFLAGS-check_hlds.prop_mode_constraints += --no-warn-obsolete
MCFLAGS-make.program_target += --no-warn-obsolete
MCFLAGS-make.track_flags += --no-warn-obsolete
MCFLAGS-parse_tree.find_module += --no-warn-obsolete
MCFLAGS-parse_tree.grab_modules += --no-warn-obsolete
MCFLAGS-parse_tree.read_modules += --no-warn-obsolete
MCFLAGS-top_level.mercury_compile_front_end += --no-warn-obsolete
MCFLAGS-top_level.mercury_compile_llds_back_end += --no-warn-obsolete
MCFLAGS-top_level.mercury_compile_main += --no-warn-obsolete
MCFLAGS-top_level.mercury_compile_make_hlds += --no-warn-obsolete
MCFLAGS-top_level.mercury_compile_middle_passes += --no-warn-obsolete
MCFLAGS-top_level.mercury_compile_mlds_back_end += --no-warn-obsolete
# Keep all modules' contents in a consistent order, except these (for now).
MCFLAGS-check_hlds.abstract_mode_constraints += --no-warn-inconsistent-pred-order-clauses
MCFLAGS-hlds.inst_graph += --no-warn-inconsistent-pred-order-clauses
MCFLAGS-mode_robdd.tfeirn += --no-warn-inconsistent-pred-order-clauses
# Bug workarounds.
# XXX work around a bug that sometimes appears at -O4 and above.
# mmc -r analysis.file.c -s asm_fast.gc -O4 --intermodule-optimisation
MCFLAGS-analysis.file += --no-optimise-higher-order
# This works around bug 32 in Mantis.
MCFLAGS-check_hlds.check_typeclass += --no-loop-invariants
# This is the same bug as tests/valid/ho_and_type_spec_bug2.
MCFLAGS-mode_robdd.tfeirn += -O3
MCFLAGS-mode_robdd.implications += -O0