From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EF4B4158094 for ; Sat, 16 Jul 2022 13:44:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1DB08E0F25; Sat, 16 Jul 2022 13:44:27 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F0F09E0F25 for ; Sat, 16 Jul 2022 13:44:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C15C6341053 for ; Sat, 16 Jul 2022 13:44:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3048053D for ; Sat, 16 Jul 2022 13:44:24 +0000 (UTC) From: "Anna Vyalkova" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anna Vyalkova" Message-ID: <1657979048.79aaa2458e6edc64df0e2e3f81135d7436cefa29.cybertailor@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/nim-utils.eclass X-VCS-Directories: eclass/ X-VCS-Committer: cybertailor X-VCS-Committer-Name: Anna Vyalkova X-VCS-Revision: 79aaa2458e6edc64df0e2e3f81135d7436cefa29 X-VCS-Branch: dev Date: Sat, 16 Jul 2022 13:44:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 53b5030d-524d-412a-bbbc-33e675af213e X-Archives-Hash: dc3e1d7e92609d78b5705cf88ebbd17f commit: 79aaa2458e6edc64df0e2e3f81135d7436cefa29 Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Sat Jul 16 07:15:22 2022 +0000 Commit: Anna Vyalkova sysrq in> CommitDate: Sat Jul 16 13:44:08 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=79aaa245 nim-utils.eclass: allow debug builds Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> eclass/nim-utils.eclass | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/eclass/nim-utils.eclass b/eclass/nim-utils.eclass index b85bba1d8..cdf1d78e3 100644 --- a/eclass/nim-utils.eclass +++ b/eclass/nim-utils.eclass @@ -91,6 +91,19 @@ etestament() { "$@" || die -n "${*} failed" } +# @FUNCTION: nim_get_buildtype +# @USAGE: +# @RETURN: build type (debug or release) based on USE flags +nim_get_buildtype() { + debug-print-function ${FUNCNAME} "${@}" + + if has debug ${IUSE}; then + echo $(usex debug "debug" "release") + else + echo "release" + fi +} + # @FUNCTION: nim_gen_config # @USAGE: [] # @DESCRIPTION: @@ -121,7 +134,7 @@ nim_gen_config() { gcc.cpp.options.linker:"${LDFLAGS}" $([[ "${NOCOLOR}" == true || "${NOCOLOR}" == yes ]] && echo '--colors:"off"') - -d:"release" + -d:"$(nim_get_buildtype)" --parallelBuild:"$(makeopts_jobs)" $(printf "%s\n" ${NIMFLAGS}) EOF