diff options
author | WANG Xuerui <xen0n@gentoo.org> | 2024-03-07 17:43:00 +0800 |
---|---|---|
committer | WANG Xuerui <xen0n@gentoo.org> | 2024-03-09 10:54:51 +0800 |
commit | 3582ca8048830238fe79f4e8c96b2969f1e1961f (patch) | |
tree | e753a1a2a3b6cfa4865356e1a15e5458649da9e0 /dev-lang | |
parent | sys-devel/rust-std: apply vendored-sources patch to rust-std too (diff) | |
download | gentoo-3582ca8048830238fe79f4e8c96b2969f1e1961f.tar.gz gentoo-3582ca8048830238fe79f4e8c96b2969f1e1961f.tar.bz2 gentoo-3582ca8048830238fe79f4e8c96b2969f1e1961f.zip |
dev-lang/rust-bin: add IUSE=profiler
Parallel to dev-lang/rust's IUSE=profiler.
See: https://github.com/gentoo/gentoo/pull/35085#issuecomment-1920621395
Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/rust-bin/metadata.xml | 1 | ||||
-rw-r--r-- | dev-lang/rust-bin/rust-bin-1.76.0.ebuild | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/dev-lang/rust-bin/metadata.xml b/dev-lang/rust-bin/metadata.xml index 9394f9a99c4e..91f4d5850916 100644 --- a/dev-lang/rust-bin/metadata.xml +++ b/dev-lang/rust-bin/metadata.xml @@ -15,6 +15,7 @@ </maintainer> <use> <flag name="clippy">Install clippy, Rust code linter</flag> + <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> <flag name="rust-analyzer">Install rust-analyzer, A Rust compiler front-end for IDEs (language server)</flag> <flag name="rust-src">Install rust-src, needed by developer tools and for build-std (cross)</flag> diff --git a/dev-lang/rust-bin/rust-bin-1.76.0.ebuild b/dev-lang/rust-bin/rust-bin-1.76.0.ebuild index e94e37c4c2e1..cf893ca4fc23 100644 --- a/dev-lang/rust-bin/rust-bin-1.76.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.76.0.ebuild @@ -31,7 +31,7 @@ SRC_URI="$(rust_all_arch_uris ${MY_P}) LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="stable" KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~x86" -IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" +IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix profiler rust-analyzer rust-src rustfmt" DEPEND="" @@ -111,6 +111,7 @@ multilib_src_install() { local components="rustc,cargo,${std}" use doc && components="${components},rust-docs" use clippy && components="${components},clippy-preview" + use profiler && components="${components},rust-demangler-preview" use rustfmt && components="${components},rustfmt-preview" use rust-analyzer && components="${components},rust-analyzer-preview,${analysis}" # Rust component 'rust-src' is extracted from separate archive @@ -148,6 +149,7 @@ multilib_src_install() { ) use clippy && symlinks+=( clippy-driver cargo-clippy ) + use profiler && symlinks+=( rust-demangler ) use rustfmt && symlinks+=( rustfmt cargo-fmt ) use rust-analyzer && symlinks+=( rust-analyzer ) @@ -195,6 +197,9 @@ multilib_src_install() { echo /usr/bin/clippy-driver >> "${T}/provider-${P}" echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" fi + if use profiler; then + echo /usr/bin/rust-demangler >> "${T}/provider-${P}" + fi if use rustfmt; then echo /usr/bin/rustfmt >> "${T}/provider-${P}" echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" |