# sccache/cfg - "Build" settings for package #--------------------------------------------------------------------- [technotes] 1. By default, if this package is built, it: (a) doesn't delete the "rustlocal" package tree (b) doesn't delete previously cached build objects (c) downloads sources for some Rust libraries and programs un- less they're already present (d) builds some Rust libraries and programs in the "rustlocal" package tree To force actual as opposed to cached compiles, delete the following cache directory tree first: $PRODTREE/rustlocal/rusthome/sccache/ To force a full rebuild from scratch, delete the following package directory tree instead: $PRODTREE/rustlocal/ This will both (a) download updated sources and (b) rebuild from scra- tch. If you do this, you'll need to rebuild the following packages in dir- ectory name order: /src/*_rust/* except for "0010_rustc" /src/*/_rusthigh For a rebuild from scratch, Internet access is required. The results of this type of build are unpredictable. This type of build may very well fail. #--------------------------------------------------------------------- 2. The following procedure: export RUSTOFFLINE=true makelac sccache --force rebuilds the same libraries and programs using the same sources. It shouldn't access the Internet. This mode requires that a full build from scratch have been done previously. Cached build objects may be used unless the following cache tree is deleted first: $PRODTREE/rustlocal/rusthome/sccache/ #--------------------------------------------------------------------- 3. In the default mode, this package requires Internet access to bui- ld. Builds are also non-repeatable; i.e., the results may be differ- ent each time and builds may not work at all. This is one of relatively few packages of this type that Laclin sup- ports. #--------------------------------------------------------------------- 4. This package doesn't modify the Rust compiler directory tree at: $PRODTREE/rustc/ #--------------------------------------------------------------------- [buildtimes] 00.13 hours (or 008.05 minutes) - 2023 dedi Xeon E3-1200 v3 4x2 32GB RAM - rustc 1.87.0 and clang 20.1.5 - 250524 #--------------------------------------------------------------------- [settings] compiler = clang configure = none defer = glibc64 license = tbd proddir = none purge = no strip = no unpack = none setpaths = rustc #--------------------------------------------------------------------- [depends] rustc upx #--------------------------------------------------------------------- [build] export RUSTC_BOOTSTRAP=1 OFFLINESW="" if [ "@$RUSTOFFLINE" == "@1" ]; then RUSTOFFLINE=true ; fi if [ "@$RUSTOFFLINE" == "@yes" ]; then RUSTOFFLINE=true ; fi if [ "@$RUSTOFFLINE" == "@true" ]; then OFFLINESW=--offline ; fi HERE=`pwd` PP=$PRODTREE/rustlocal BINDIR=$PP/bin TGTDIR=$HERE/target RUSTOFFLINE=$RUSTOFFLINE rm -fr $TGTDIR mkdir -p $BINDIR $TGTDIR pkill --full /bin/sccache || true cd $PP mkdir -p rusthome cd rusthome export HOME=`pwd` export CARGO_TARGET_DIR=$TGTDIR #--------------------------------------------------------------------- SC1=$HOME/.cargo/bin/sccache SC2=$BINDIR/sccache if [ \! -f $SC2 ]; then if [ -f $SC1 ]; then rm -fr $SC2 cp -p $SC1 $SC2 fi fi if [ -f $SC2 ]; then echo `date` ==== sccache already exists export RUSTC_WRAPPER=$SC2 echo `date` ==== RUSTC_WRAPPER is $RUSTC_WRAPPER fi export SCCACHE_DIR=$HOME/sccache mkdir -p $SCCACHE_DIR echo SCCACHE_DIR is $SCCACHE_DIR export SCCACHE_CACHE_SIZE="15G" echo ==== `date` build of sccache started cd $HOME rm -fr sccache-git* deco $PKGDIR_SPECIAL/sccache-git*.tar* cd sccache-git* if [ "@$RUSTOFFLINE" \!= "@true" ]; then echo ==== `date` git fetch git fetch fi echo ==== `date` \ cargo build $OFFLINESW --release cargo build $OFFLINESW --release pkill --full bin/sccache || true mv $CARGO_TARGET_DIR/release/sccache $BINDIR/ cd $HOME rm -fr sccache-git* export RUSTC_WRAPPER=$BINDIR/sccache echo `date` ==== RUSTC_WRAPPER is $RUSTC_WRAPPER strip $RUSTC_WRAPPER ls -l $RUSTC_WRAPPER echo ==== `date` build of sccache done #--------------------------------------------------------------------- # Original URLs. These URLs were valid at one point, but may have died # since then. If you download newer versions of tarballs [etc.], don't # delete the original versions, as you may not be able to replace # them. [urls] url_debian = tbd url_home = tbd url_lfs = tbd url_tarball = n/a # See "technotes" in "cfg" file #--------------------------------------------------------------------- [history] 240728 Added "sccache" to "rustlocal" 240728 Started with 29d17c7c5 ("git" hash) 250525 Moved "sccache" to its own package 250525 Updated to 702529544