mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-12 20:34:19 +00:00
Estimated hours taken: 4 Branches: main Enable the new grade specifiers, ll_debug and gcd. ll_debug means compile with -O0 and -g. gcd means compile the boehm_gc with #defines that allow memory leaks to be debugged. boehm_gc/Makefile: Use findstring to see which grade specifiers are available. Only add BOEHM_CFLAGS_FOR_THREADS if par in GRADE. Only define NO_DEBUGGING if we are not in gcd. compiler/compile_target_code.m: compiler/globals.m: compiler/handle_options.m: Handle the gc_boehm_debug. compiler/handle_options.m: runtime/mercury_grade.h: scripts/canonical_grade.sh-subr: scripts/init_grade_options.sh-subr: scripts/parse_grade_options.sh-subr: Handle the new grade specifiers. scripts/mgnuc.in: Set the #defines implied by the new grade specifiers. scripts/ml.in: Calculate the name of the boehm_gc library.
92 lines
2.6 KiB
Plaintext
92 lines
2.6 KiB
Plaintext
#---------------------------------------------------------------------------#
|
|
# Copyright (C) 1997-2006 The 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.
|
|
#---------------------------------------------------------------------------#
|
|
#
|
|
# init_grade_options.sh-subr:
|
|
# An `sh' subroutine for initializing grade-related options.
|
|
# Used by the `ml', `mgnuc' and `c2init' scripts.
|
|
#
|
|
# The code here should be inserted before a script's option-parsing
|
|
# loop. The invoking script must define a DEFAULT_GRADE option.
|
|
#
|
|
# IMPORTANT: any changes to the handling of grades here may also require
|
|
# changes to all the files indicated by runtime/mercury_grade.h.
|
|
#
|
|
# This file must initialize all the shell variables used by
|
|
# parse_grade_options.sh-subr, and must list all the options processed in
|
|
# parse_grade_options.sh-subr.
|
|
#
|
|
#---------------------------------------------------------------------------#
|
|
|
|
grade_usage="\
|
|
Grade options:
|
|
-s <grade>, --grade <grade>
|
|
--target {il, c, java, asm}
|
|
--il
|
|
--asm-labels
|
|
--gcc-non-local-gotos
|
|
--gcc-global-registers
|
|
-H, --high-level-code
|
|
--parallel
|
|
--gc {boehm, boehm_debug, mps, accurate, none}
|
|
-p, --profiling
|
|
--profile-calls
|
|
--profile-time
|
|
--profile-memory
|
|
--profile-deep
|
|
--record-term-sizes-as-words
|
|
--record-term-sizes-as-cells
|
|
--use-trail
|
|
--reserve-tag
|
|
--use-minimal-model-stack-copy
|
|
--use-minimal-model-own-stacks
|
|
--minimal-model-debug
|
|
--pic-reg
|
|
--no-stack-trace
|
|
--debug
|
|
--decl-debug
|
|
--low-level-debug
|
|
--extend-stacks-when-needed
|
|
See the documentation in the \"Invocation\" section
|
|
of the Mercury User's Guide."
|
|
|
|
# --gcc-nested-functions is not yet documented because it is not yet stable
|
|
# --high-level-data is not yet documented because it is not yet implemented
|
|
# --high-level is not yet documented because --high-level-data is
|
|
# not yet implemented
|
|
|
|
target=c
|
|
highlevel_code=false
|
|
highlevel_data=false
|
|
gcc_nested_functions=false
|
|
asm_labels=true
|
|
non_local_gotos=true
|
|
global_regs=true
|
|
thread_safe=false
|
|
gc_method=boehm
|
|
profile_time=false
|
|
profile_calls=false
|
|
profile_memory=false
|
|
profile_deep=false
|
|
record_term_sizes_as_words=false
|
|
record_term_sizes_as_cells=false
|
|
use_trail=false
|
|
reserve_tag=false
|
|
use_minimal_model_stack_copy=false
|
|
use_minimal_model_own_stacks=false
|
|
minimal_model_debug=false
|
|
pic_reg=false
|
|
debug=false
|
|
decl_debug=false
|
|
ll_debug=false
|
|
extend_stacks=false
|
|
|
|
case $# in
|
|
0) set - --grade "$DEFAULT_GRADE" ;;
|
|
*) set - --grade "$DEFAULT_GRADE" "$@" ;;
|
|
esac
|
|
|
|
#---------------------------------------------------------------------------#
|