commit:     9e8e96ef78ad1e9dfbd84587c45e80e4922d80f5
Author:     WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  7 09:43:43 2024 +0000
Commit:     WANG Xuerui <xen0n <AT> gentoo <DOT> org>
CommitDate: Sat Mar  9 02:54:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e8e96ef

virtual/rust: add IUSE=profiler

See: https://github.com/gentoo/gentoo/pull/35085#issuecomment-1920621395
Closes: https://github.com/gentoo/gentoo/pull/35272
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>

 virtual/rust/metadata.xml       | 1 +
 virtual/rust/rust-1.76.0.ebuild | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/virtual/rust/metadata.xml b/virtual/rust/metadata.xml
index d7906a9ad75a..999eaba04c29 100644
--- a/virtual/rust/metadata.xml
+++ b/virtual/rust/metadata.xml
@@ -14,6 +14,7 @@
                <name>Rust Project</name>
        </maintainer>
        <use>
+               <flag name="profiler">Build the profiler runtime and 
rust-demangler tool (needed for '-C profile-generate' or '-C 
instrument-coverage' codegen opts)</flag>
                <flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
        </use>
        <stabilize-allarches/>

diff --git a/virtual/rust/rust-1.76.0.ebuild b/virtual/rust/rust-1.76.0.ebuild
index 208c9e6ba7a4..187391b93274 100644
--- a/virtual/rust/rust-1.76.0.ebuild
+++ b/virtual/rust/rust-1.76.0.ebuild
@@ -14,10 +14,10 @@ LICENSE=""
 # neither system nor bundled, so we just hardcode it here.
 SLOT="0/llvm-17"
 KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="rustfmt"
+IUSE="rustfmt profiler"
 
 BDEPEND=""
 RDEPEND="|| (
-       ~dev-lang/rust-bin-${PV}[rustfmt?,${MULTILIB_USEDEP}]
-       ~dev-lang/rust-${PV}[rustfmt?,${MULTILIB_USEDEP}]
+       ~dev-lang/rust-bin-${PV}[profiler?,rustfmt?,${MULTILIB_USEDEP}]
+       ~dev-lang/rust-${PV}[profiler?,rustfmt?,${MULTILIB_USEDEP}]
 )"

Reply via email to