Files
mercury/scripts/prepare_install_dir.in
Peter Wang b0ae10248b Use --trans-opt-deps-spec option.
Use the recently added --trans-opt-deps-spec option to break cycles in
the trans-opt dependency graph for the standard library. This enables
more parallelism when making the .trans_opt files; it now takes about
half as long as before.

Ordering modules sensibly, so that .trans_opt files are created in a
logical order, also improves analysis results for many predicates and
functions. The only results which show a regression with this change are
for deprecated forwarding predicates/functions.

In future, we will probably be able to trim more dependencies to further
improve parallelism, without impacting analysis results.

configure.ac:
    Check that the bootstrap compiler supports --trans-opt-deps-spec.

library/mer_std.trans_opt_deps_spec:
    Add the spec file that adjusts dependencies in the trans-opt
    dependency graph.

library/INTER_FLAGS:
    Use the --trans-opt-deps-spec option when building with mmake.

scripts/prepare_install_dir.in:
tools/binary:
tools/bootcheck:
tools/unary:
    Copy mer_std.trans_opt_deps_spec when preparing a copy of the
    library directory.
2023-01-25 16:48:45 +11:00

109 lines
3.7 KiB
Bash

#!/bin/sh
#---------------------------------------------------------------------------#
# vim: ts=4 sw=4 et ft=sh
#---------------------------------------------------------------------------#
# Copyright (C) 2008, 2010, 2012 The University of Melbourne.
# Copyright (C) 2014-2016 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.
#---------------------------------------------------------------------------#
if test "$#" != 1
then
echo "Usage: prepare_install_dir <installdirname>"
exit 1
fi
installdir=$1;
ln_s="@LN_S@"
if test "$ln_s" = "false"
then
ln_s="cp -r"
fi
wd=`/bin/pwd`
rm -fr ${installdir}
mkdir ${installdir}
cp Mmake* ${installdir}
cp Mercury.* ${installdir}
cp VERSION ${installdir}
cp config* ${installdir}
cp aclocal.m4 ${installdir}
cp mercury.snk ${installdir}
mkdir ${installdir}/scripts
cp scripts/* ${installdir}/scripts
mkdir ${installdir}/tools
cp tools/* ${installdir}/tools
$ln_s $wd/compiler ${installdir}
$ln_s $wd/robdd ${installdir}
$ln_s $wd/util ${installdir}
mkdir ${installdir}/boehm_gc
mkdir ${installdir}/boehm_gc/Mac_files
mkdir ${installdir}/boehm_gc/cord
mkdir ${installdir}/boehm_gc/include
mkdir ${installdir}/boehm_gc/include/private
mkdir ${installdir}/boehm_gc/tools
cp boehm_gc/NT*_MAKEFILE ${installdir}/boehm_gc
cp boehm_gc/*.[Mm]ak ${installdir}/boehm_gc
cp boehm_gc/Makefile* ${installdir}/boehm_gc
cp boehm_gc/Mmake* ${installdir}/boehm_gc
cp boehm_gc/*.cc ${installdir}/boehm_gc
cp boehm_gc/*.cpp ${installdir}/boehm_gc
cp boehm_gc/*.[chsS] ${installdir}/boehm_gc
cp boehm_gc/cord/*.[ch] ${installdir}/boehm_gc/cord
cp boehm_gc/include/*.[ch] ${installdir}/boehm_gc/include
cp boehm_gc/include/private/*.[ch] ${installdir}/boehm_gc/include/private
cp boehm_gc/*.[chsS] ${installdir}/boehm_gc/
cp boehm_gc/tools/*.[ch] ${installdir}/boehm_gc/tools
cp boehm_gc/tools/*.sh ${installdir}/boehm_gc/tools
cp -Rp boehm_gc/libatomic_ops ${installdir}/boehm_gc
rm -fr ${installdir}/boehm_gc/libatomic_ops/src/*.o
rm -fr ${installdir}/boehm_gc/libatomic_ops/src/*.a
cp -Rp boehm_gc/extra ${installdir}/boehm_gc
mkdir ${installdir}/runtime
mkdir ${installdir}/runtime/machdeps
cp runtime/Mmake* ${installdir}/runtime
cp runtime/.mgnuc* ${installdir}/runtime
cp runtime/*.in ${installdir}/runtime
cp runtime/*.[ch] ${installdir}/runtime
cp runtime/*.cs ${installdir}/runtime
cp runtime/machdeps/*.h ${installdir}/runtime/machdeps
mkdir ${installdir}/trace
cp trace/Mmake* ${installdir}/trace
cp trace/.mgnuc* ${installdir}/trace
cp trace/*.[chyl] ${installdir}/trace
mkdir ${installdir}/library
cp library/Mmake* ${installdir}/library
cp library/Mercury.* ${installdir}/library
cp library/.mgnuc* ${installdir}/library
cp library/*FLAGS* ${installdir}/library
cp library/mer_std.trans_opt_deps_spec ${installdir}/library
cp library/print_extra_inits ${installdir}/library
cp library/library_strong_name.sn ${installdir}/library
cp library/*.m ${installdir}/library
mkdir ${installdir}/mdbcomp
cp mdbcomp/Mmake* ${installdir}/mdbcomp
cp mdbcomp/Mercury.* ${installdir}/mdbcomp
cp mdbcomp/.mgnuc* ${installdir}/mdbcomp
cp mdbcomp/*FLAGS* ${installdir}/mdbcomp
cp mdbcomp/*.m ${installdir}/mdbcomp
mkdir ${installdir}/browser
cp browser/Mmake* ${installdir}/browser
cp browser/Mercury.* ${installdir}/browser
cp browser/.mgnuc* ${installdir}/browser
cp browser/*FLAGS* ${installdir}/browser
cp browser/*.m ${installdir}/browser
mkdir ${installdir}/ssdb
cp ssdb/Mmake* ${installdir}/ssdb
cp ssdb/Mercury.* ${installdir}/ssdb
cp ssdb/.mgnuc* ${installdir}/ssdb
cp ssdb/*FLAGS* ${installdir}/ssdb
cp ssdb/*.m ${installdir}/ssdb
mkdir ${installdir}/java
mkdir ${installdir}/java/runtime
cp java/runtime/*.java ${installdir}/java/runtime
exit 0