Files
mercury/scripts/mgnuc_file_opts.sh-subr
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

87 lines
2.6 KiB
Bash

#---------------------------------------------------------------------------#
# vim: ts=4 sw=4 expandtab ft=sh
#---------------------------------------------------------------------------#
# Copyright (C) 2005, 2010 The University of Melbourne.
# Copyright (C) 2014, 2018, 2020, 2022 The Mercury team.
# This file may only be copied under the terms of the GNU General
# Public License - see the file COPYING in the Mercury distribution.
#---------------------------------------------------------------------------#
#
# mgnuc_file_opts.sh-subr:
#
# An `sh' subroutine for processing the mgnuc options that can be set from
# .mgnuc_opts files. It is included twice in mgnuc. Its implementation is
# bound tightly to the code of mgnuc.in; all the variables it manipulates
# come from there.
#
# At the moment, this includes only options that do not have arguments.
# This is because processing options with arguments is hard to do without
# overriding the argument vector, and there is no simple way to preserve
# the exact structure of the original argument vector *including* any spaces
# inside individual arguments. There is no real need (at least right now)
# for putting such options into .mgnuc_opts files.
#
#---------------------------------------------------------------------------#
-v|--verbose)
verbose=true
;;
-v-|--no-verbose)
verbose=false
;;
--no-ansi)
;;
--no-check)
CHECK_OPTS=
;;
--inline-alloc)
INLINE_ALLOC_OPTS="-DMR_INLINE_ALLOC -DSILENT"
;;
--no-inline-alloc)
INLINE_ALLOC_OPTS=""
;;
-g|--c-debug)
c_debug=true
;;
-g-|--no-c-debug)
c_debug=false
;;
--c-optimize)
c_optimize=true
;;
--no-c-optimize)
c_optimize=false
;;
--use-activation-counts)
use_activation_counts=true
;;
--no-use-activation-counts)
use_activation_counts=false
;;
--preserve-tail-recursion)
preserve_tail_recursion=true
;;
--no-preserve-tail-recursion)
preserve_tail_recursion=false
;;
--no-mercury-standard-library-directory|--no-mercury-stdlib-dir)
unset mercury_stdlib_dir
unset mercury_config_dir
;;
--no-filter-cc)
do_filter_cc=false
;;
--halt-at-warn-if-possible)
halt_at_warn_if_possible=true
;;