Add more skips to build-setup
@@ -29,12 +29,16 @@ usage() {
echo " --help -h : Display this message"
echo " --unpinned-deps -ud : Use unpinned conda environment"
echo " --skip-validate : Skip prompt checking for tagged release/conda"
+ echo " --skip-conda : Skip conda env creation"
+ echo " --skip-toolchain-extra : Skip building extra RISC-V toolchain collateral (Spike, PK, tests, libgloos)"
exit "$1"
}
TOOLCHAIN="riscv-tools"
USE_PINNED_DEPS=true
SKIP_VALIDATE_FLAG=""
+SKIP_CONDA=false
+SKIP_TOOLCHAIN=false
# getopts does not support long options, and is inflexible
while [ "$1" != "" ];
@@ -48,6 +52,10 @@ do
USE_PINNED_DEPS=false ;;
--skip-validate)
SKIP_VALIDATE_FLAG=$1 ;;
+ --skip-conda)
+ SKIP_CONDA=true ;;
+ --skip-toolchain-extra)
+ SKIP_TOOLCHAIN=true ;;
* )
error "invalid option $1"
usage 1 ;;
@@ -55,13 +63,7 @@ do
shift
done
-if [ "$SKIP_VALIDATE" = false ]; then
- if [ -z ${CONDA_DEFAULT_ENV+x} ]; then
- error "ERROR: No conda environment detected. Did you activate the conda environment (e.x. 'conda activate base')?"
- exit 1
- fi
-fi
-
+if [ "$SKIP_CONDA" = false ]; then
# note: lock file must end in .conda-lock.yml - see https://github.com/conda-incubator/conda-lock/issues/154
LOCKFILE=$DIR/conda-requirements-$TOOLCHAIN-linux-64.conda-lock.yml
YAMLFILE=$DIR/conda-requirements-$TOOLCHAIN.yaml
@@ -76,9 +78,20 @@ conda-lock install -p $DIR/.conda-env $LOCKFILE
source $DIR/.conda-env/etc/profile.d/conda.sh
conda activate $DIR/.conda-env
+fi
+
+if [ -z "$SKIP_VALIDATE_FLAG" ]; then
+ if [ -z ${CONDA_DEFAULT_ENV+x} ]; then
+ error "ERROR: No conda environment detected. Did you activate the conda environment (e.x. 'conda activate base')?"
+ exit 1
+ fi
+fi
$DIR/scripts/init-submodules-no-riscv-tools.sh $SKIP_VALIDATE_FLAG
+
+if [ "$SKIP_TOOLCHAIN" = false ]; then
$DIR/scripts/build-toolchain-extra.sh $SKIP_VALIDATE_FLAG $TOOLCHAIN
+fi
cat << EOT >> env.sh
# line auto-generated by $0
