mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 17:33:38 +00:00
Estimated hours taken: 8 Branches: main Update files as required for the addition of the new library `libmer_ssdb', and make the changes to add a new grade component `ssdebug'. Mmake.workspace: Mmakefile: Add `mer_ssdb.init', `libmer_ssdb' and `ssdb' directory to the appropriate lists. Order "ssdb" occurrences according to its position in the list of which libraries can call functions in which other libraries. configure.in: Check the bootstrap compiler supports the `--no-ssdb' option. browser/MDB_FLAGS.in: library/LIB_FLAGS.in: mdbcomp/MDBCOMP_FLAGS.in: Add `--no-ssdb' to break the cyclic dependencies between these libraries and `libmer_ssdb' that would be introduced if the source-to-source debugging transformation was applied these libraries. It also prevents the infinite recursion which would result from ssdb procedures calling transformed library procedures and vice versa. analysis/.mgnuc_copts: analysis/ANALYSIS_FLAGS.in: analysis/Mmakefile: profiler/.mgnuc_copts: profiler/PROF_FLAGS.in: slice/.mgnuc_copts: slice/Mmakefile: slice/SLICE_FLAGS.in: Search the `ssdb' directory for files. compiler/Mmakefile: Remove the explicit `libmer_ssdb.a' from MLOBJS as it is redundant. Make the compiler binary depend on `libmer_ssdb'. compiler/compile_target_code.m: scripts/mgnuc.in: Pass "-DMR_SS_DEBUG" when compiling a C file if `--ssdb' is enabled. Implicitly include `mer_ssdb.init' and `libmer_ssdb' in various lists when `--ssdb' is enabled. runtime/mercury_conf_param.h: Document `MR_SS_DEBUG' preprocessor macro. 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: Add "ssdebug" grade component. Add "--ss-debug" option as an alias for "--ssdb" to be consistent with "--decl-debug". Move the clauses to the right position. scripts/c2init.in: scripts/ml.in: Link in `libmer_ssdb' if `--ssdb' enabled. tools/lmc.in: tools/lml: Link in `libmer_ssdb' and add `mer_ssdb.init'. tools/bootcheck: Delete `ssdb' directory if `--disable-debug-libs' option enabled. tools/binary: tools/linear: Link `ssdb' directory. compiler/notes/overall_design.html: Mention `ssdb' directory. doc/user_guide.texi: Add commented out documentation for the `--ss-debug' option and the `ssdebug' grade component.
58 lines
1.6 KiB
Bash
Executable File
58 lines
1.6 KiB
Bash
Executable File
#!/bin/sh
|
|
#---------------------------------------------------------------------------#
|
|
# Copyright (C) 2001, 2003, 2005 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.
|
|
#---------------------------------------------------------------------------#
|
|
#
|
|
# This shell script allows you to execute a version of the Mercury linker
|
|
# that will link with the libraries that you have built in a workspace.
|
|
#
|
|
# You can use this with `mmake' as follows:
|
|
#
|
|
# WORKSPACE=$HOME/mer/ws1 PATH=$WORKSPACE/tools:$PATH mmake MC=lmc ML=lml
|
|
#
|
|
# If you want to track down some C level bug, you can ask this script to
|
|
# pass -g to the C compiler and to the linker by setting the environment
|
|
# variable MMC_CDEBUG to the string "true".
|
|
|
|
if test ! -d $WORKSPACE
|
|
then
|
|
echo "workspace $WORKSPACE does not exist"
|
|
fi
|
|
|
|
if test -s $WORKSPACE/boehm_gc/libgc.a
|
|
then
|
|
gclib="$WORKSPACE/boehm_gc/libgc.a"
|
|
elif test -s $WORKSPACE/boehm_gc/libpar_gc.a
|
|
then
|
|
gclib="$WORKSPACE/boehm_gc/libpar_gc.a"
|
|
elif test -s $WORKSPACE/boehm_gc/libgc_prof.a
|
|
then
|
|
gclib="$WORKSPACE/boehm_gc/libgc_prof.a"
|
|
else
|
|
echo "$WORKSPACE/boehm_gc does not have a gc library"
|
|
fi
|
|
|
|
MERCURY_LIBS="\
|
|
$WORKSPACE/trace/libmer_trace.a \
|
|
$WORKSPACE/ssdb/libmer_ssdb.a \
|
|
$WORKSPACE/browser/libmer_browser.a \
|
|
$WORKSPACE/mdbcomp/libmer_mdbcomp.a \
|
|
$WORKSPACE/library/libmer_std.a \
|
|
$WORKSPACE/runtime/libmer_rt.a \
|
|
$gclib -lm"
|
|
export MERCURY_LIBS
|
|
|
|
PATH="$WORKSPACE/scripts:$WORKSPACE/util:$PATH"
|
|
export PATH
|
|
|
|
if test "$MMC_CDEBUG" != ""
|
|
then
|
|
CDEBUG_FLAGS="--no-strip"
|
|
else
|
|
CDEBUG_FLAGS=""
|
|
fi
|
|
|
|
ml $CDEBUG_FLAGS "$@"
|