diff options
-rw-r--r-- | eclass/crystal-utils.eclass | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass index 09a4049a4..3c0b7d48a 100644 --- a/eclass/crystal-utils.eclass +++ b/eclass/crystal-utils.eclass @@ -24,7 +24,7 @@ esac if [[ ! ${_CRYSTAL_UTILS_ECLASS} ]]; then _CRYSTAL_UTILS_ECLASS=1 -inherit edo flag-o-matic +inherit edo flag-o-matic multiprocessing # @ECLASS_VARIABLE: CRYSTAL_DEPS # @OUTPUT_VARIABLE @@ -151,4 +151,17 @@ eshards() { edo shards "${args[@]}" "${@}" } +# @FUNCTION: crystal_build +# @USAGE: <args>... +# @DESCRIPTION: +# Function for building a target. All arguments are passed to crystal. +crystal_build() { + local build_args=( + --threads=$(makeopts_jobs) + --verbose + ) + + ecrystal build "${build_args[@]}" "${@}" +} + fi |