aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2023-05-08 23:51:48 +0500
committerAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2023-05-09 20:42:47 +0500
commita908862549f4504fd88bfbe5305dd3c34101ea77 (patch)
tree260563418cfa138601d7cb39be62437f9e6c3578 /eclass
parentshards.eclass: do not use 'shards build' (diff)
downloadguru-a908862549f4504fd88bfbe5305dd3c34101ea77.tar.gz
guru-a908862549f4504fd88bfbe5305dd3c34101ea77.tar.bz2
guru-a908862549f4504fd88bfbe5305dd3c34101ea77.zip
crystal-utils.eclass: add crystal_build function
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/crystal-utils.eclass15
1 files changed, 14 insertions, 1 deletions
diff --git a/eclass/crystal-utils.eclass b/eclass/crystal-utils.eclass
index 09a4049a46..3c0b7d48aa 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