Files
mercury/scripts/mgnuc_file_opts.sh-subr
Zoltan Somogyi 32006a1c7c Rename and generalize .c_debug to .target_debug.
runtime/mercury_grade.h:
    Rename the grade modifier, and the C macro that represents it.

compiler/options.m:
    Rename the --c-debug-grade option to --target-debug-grade.

compiler/compute_grade.m:
    Rename the grade modifier, and the option that represents it.

    Restrict the .target_debut grade modifier to MLDS grades.

compiler/handle_options.m:
    Implement --target-debug-grade by having it imply --target-debug.

compiler/compile_target_code.m:
compiler/link_target_code.m:
    Pay attention to either --target-debug-grade (for purposes related
    to the grade itself) and to --target-debug (for all other purposes).

scripts/canonical_grade.in:
scripts/canonical_grade.sh-subr:
scripts/final_grade_options.sh-subr:
scripts/init_grade_options.sh-subr:
scripts/parse_grade_options.sh-subr:
    Parse target_debug grade modifiers and --target-debug-grade options
    instead of c_debug grade modifiers and --c-debug-grade options.

    Add (normally commented-out) infrastructure to make it easier
    to debug changes.

    Restrict the .target_debut grade modifier to MLDS grades.

scripts/mgnuc.in:
scripts/mgnuc_file_opts.sh-subr:
    Rename some variables to clarify the distinction between the
    --target-debug option (which, like -g, enabled debugging of only one file)
    and the --target-debug-grade option (which enables it for the whole
    program).

configure.ac:
    Make it easier to debug grade-related changes by recording
    both autoconfigured and user-supplied grades that the rejected by
    the canonical_grade script.

    Conform to the changes above.

README.sanitizers:
doc/user_guide.texi:
grade_lib/grade_spec.m:
grade_lib/grade_string.m:
scripts/ml.in:
tests/warnings/help_text.err_exp:
tools/lmc.in:
tools/test_mercury:
    Conform to the changes above.

scripts/Mmake.vars.in:
    Add some XXXs about style.
2025-08-09 21:48:23 +02:00

89 lines
2.7 KiB
Bash

#---------------------------------------------------------------------------#
# vim: ts=4 sw=4 expandtab ft=sh
#---------------------------------------------------------------------------#
# Copyright (C) 2005, 2010 The University of Melbourne.
# Copyright (C) 2014, 2018, 2020, 2022, 2025 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; once to process options
# from the command line, and once to process options from .mgnuc_opts files.
#
# The code of this file is tightly bound 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)
mgnuc_c_debug=true
;;
-g-|--no-c-debug)
mgnuc_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
;;