Changeset 7c6b262


Ignore:
Timestamp:
May 12, 2020, 1:58:59 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
730f4f1
Parents:
a7b486b
Message:

Added option to limit bandwith during the distribution phase of th build (when using distcc)

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • configure

    ra7b486b r7c6b262  
    802802with_cfa_name
    803803enable_distcc
     804with_bwlimit
    804805with_target_hosts
    805806enable_gprofiler
     
    14811482  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    14821483  --with-cfa-name=NAME     NAME too which cfa will be installed
     1484  --with-bwlimit=RATE     RATE the maximum rate at which rsync will be limited when using distributed builds
    14831485  --with-target-hosts=HOSTS     HOSTS comma seperated list of hosts to build for, format ARCH:debug|nodebug|nolib
    14841486  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
     
    31983200else
    31993201  enable_distcc=no
     3202fi
     3203
     3204
     3205
     3206# Check whether --with-bwlimit was given.
     3207if test "${with_bwlimit+set}" = set; then :
     3208  withval=$with_bwlimit;
    32003209fi
    32013210
  • configure.ac

    ra7b486b r7c6b262  
    6464        [  --enable-distcc     whether or not to enable distributed compilation],
    6565        enable_distcc=$enableval, enable_distcc=no)
     66
     67AC_ARG_WITH(bwlimit,
     68        [  --with-bwlimit=RATE     RATE the maximum rate at which rsync will be limited when using distributed builds],
     69        [], [])
    6670
    6771AM_CONDITIONAL([ENABLE_DISTCC], [test x$enable_distcc = xyes])
  • libcfa/Makefile.in

    ra7b486b r7c6b262  
    253253DEFS = @DEFS@
    254254DEPDIR = @DEPDIR@
     255DIST_BWLIMIT = @DIST_BWLIMIT@
    255256DLLTOOL = @DLLTOOL@
    256257DRIVER_DIR = @DRIVER_DIR@
  • libcfa/configure

    ra7b486b r7c6b262  
    707707CONFIG_CFLAGS
    708708ARCH_FLAGS
     709DIST_BWLIMIT
    709710CFADIR_HASH
    710711LOCAL_CC1
     
    789790enable_silent_rules
    790791enable_distcc
     792with_bwlimit
    791793with_cfa_name
    792794enable_static
     
    14651467  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    14661468  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
     1469  --with-bwlimit=RATE     RATE the maximum rate at which rsync will be limited when using distributed builds
    14671470  --with-cfa-name=NAME     NAME too which cfa will be installed
    14681471  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
     
    30473050
    30483051
     3052
     3053# Check whether --with-bwlimit was given.
     3054if test "${with_bwlimit+set}" = set; then :
     3055  withval=$with_bwlimit; DIST_BWLIMIT=$withval
     3056else
     3057  DIST_BWLIMIT=0
     3058fi
     3059
     3060
    30493061echo -n "checking for distributated build... "
    30503062if test x$enable_distcc = xno; then
     
    30703082  ENABLE_DISTCC_FALSE=
    30713083fi
     3084
    30723085
    30733086
  • libcfa/configure.ac

    ra7b486b r7c6b262  
    3131        enable_distcc=$enableval, enable_distcc=no)
    3232
     33AC_ARG_WITH(bwlimit,
     34        [  --with-bwlimit=RATE     RATE the maximum rate at which rsync will be limited when using distributed builds],
     35        DIST_BWLIMIT=$withval, DIST_BWLIMIT=0)
     36
    3337echo -n "checking for distributated build... "
    3438if test x$enable_distcc = xno; then
     
    5559AC_SUBST(CFADIR_HASH)
    5660AC_SUBST(CFA_VERSION)
     61AC_SUBST(DIST_BWLIMIT)
    5762
    5863#==============================================================================
  • libcfa/prelude/Makefile.am

    ra7b486b r7c6b262  
    7272if ENABLE_DISTCC
    7373distribution: @LOCAL_CFACC@ @LOCAL_CC1@ @CFACPP@ gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh
    74         ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@
     74        ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ @DIST_BWLIMIT@
    7575        @echo "Dummy file to track distribution to remote hosts" > ${@}
    7676
  • libcfa/prelude/Makefile.in

    ra7b486b r7c6b262  
    215215DEFS = @DEFS@
    216216DEPDIR = @DEPDIR@
     217DIST_BWLIMIT = @DIST_BWLIMIT@
    217218DLLTOOL = @DLLTOOL@
    218219DRIVER_DIR = @DRIVER_DIR@
     
    655656
    656657@ENABLE_DISTCC_TRUE@distribution: @LOCAL_CFACC@ @LOCAL_CC1@ @CFACPP@ gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh
    657 @ENABLE_DISTCC_TRUE@    ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@
     658@ENABLE_DISTCC_TRUE@    ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ @DIST_BWLIMIT@
    658659@ENABLE_DISTCC_TRUE@    @echo "Dummy file to track distribution to remote hosts" > ${@}
    659660
  • libcfa/src/Makefile.in

    ra7b486b r7c6b262  
    307307DEFS = @DEFS@
    308308DEPDIR = @DEPDIR@
     309DIST_BWLIMIT = @DIST_BWLIMIT@
    309310DLLTOOL = @DLLTOOL@
    310311DRIVER_DIR = @DRIVER_DIR@
  • tools/build/push2dist.sh

    ra7b486b r7c6b262  
    22
    33hash="$1"
     4bwlim="$2"
    45valid=$(distcc -j 2> /dev/null)
    56# if test "${valid}" != 0
     
    2425function push() {
    2526        ssh ${host} "mkdir -p ~/.cfadistcc/${hash}/"
    26         rsync -a ${dV} ${files} ${host}:~/.cfadistcc/${hash}/.
     27        rsync --bwlimit=${bwlim} -a ${dV} ${files} ${host}:~/.cfadistcc/${hash}/.
    2728}
    2829
Note: See TracChangeset for help on using the changeset viewer.