summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/rust/metadata.xml1
-rw-r--r--dev-lang/rust/rust-1.60.0.ebuild11
2 files changed, 10 insertions, 2 deletions
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index 472e67741b03..9000bea3c4a7 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -15,6 +15,7 @@
<flag name="miri">Install miri, an interpreter for Rust's mid-level intermediate representation (requires USE=nightly)</flag>
<flag name="nightly">Enable nightly (UNSTABLE) features</flag>
<flag name="parallel-compiler">Build a multi-threaded rustc (experimental, not tested by upstream)</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="rls">Install rls, Rust Language Server (used with IDEs supporting RLS protocol)</flag>
<flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
<flag name="rust-src">Install rust-src, needed by developer tools and for build-std (cross)</flag>
diff --git a/dev-lang/rust/rust-1.60.0.ebuild b/dev-lang/rust/rust-1.60.0.ebuild
index f7e83c6bd47c..6a17f74e2327 100644
--- a/dev-lang/rust/rust-1.60.0.ebuild
+++ b/dev-lang/rust/rust-1.60.0.ebuild
@@ -41,7 +41,7 @@ LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
-IUSE="clippy cpu_flags_x86_sse2 debug dist doc miri nightly parallel-compiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="clippy cpu_flags_x86_sse2 debug dist doc miri nightly parallel-compiler profiler rls rustfmt rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
# Please keep the LLVM dependency block separate. Since LLVM is slotted,
# we need to *really* make sure we're not pulling more than one slot
@@ -279,6 +279,9 @@ src_configure() {
if use miri; then
tools="\"miri\",$tools"
fi
+ if use profiler; then
+ tools="\"rust-demangler\",$tools"
+ fi
if use rls; then
tools="\"rls\",\"analysis\",$tools"
fi
@@ -341,7 +344,7 @@ src_configure() {
tools = [${tools}]
verbose = 2
sanitizers = false
- profiler = false
+ profiler = $(toml_usex profiler)
cargo-native-static = false
[install]
prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
@@ -605,6 +608,7 @@ src_install() {
use clippy && symlinks+=( clippy-driver cargo-clippy )
use miri && symlinks+=( miri cargo-miri )
+ use profiler && symlinks+=( rust-demangler )
use rls && symlinks+=( rls )
use rustfmt && symlinks+=( rustfmt cargo-fmt )
@@ -664,6 +668,9 @@ src_install() {
echo /usr/bin/miri >> "${T}/provider-${P}"
echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
fi
+ if use profiler; then
+ echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
+ fi
if use rls; then
echo /usr/bin/rls >> "${T}/provider-${P}"
fi