summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-lang/rust/metadata.xml1
-rw-r--r--dev-lang/rust/rust-1.56.1.ebuild8
2 files changed, 7 insertions, 2 deletions
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
index 4ecf03a3d4ea..a51257c9ae1d 100644
--- a/dev-lang/rust/metadata.xml
+++ b/dev-lang/rust/metadata.xml
@@ -16,6 +16,7 @@
<flag name="parallel-compiler">Build a multi-threaded rustc (experimental, not tested by upstream)</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>
<flag name="system-bootstrap">Bootstrap using installed rust compiler</flag>
<flag name="system-llvm">Use the system LLVM install</flag>
<flag name="wasm">Build support for the wasm32-unknown-unknown target</flag>
diff --git a/dev-lang/rust/rust-1.56.1.ebuild b/dev-lang/rust/rust-1.56.1.ebuild
index b0dc62b63efd..ebe0f6c80373 100644
--- a/dev-lang/rust/rust-1.56.1.ebuild
+++ b/dev-lang/rust/rust-1.56.1.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 doc miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
+IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler 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
@@ -119,6 +119,7 @@ RDEPEND="${DEPEND}
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
miri? ( nightly )
parallel-compiler? ( nightly )
+ rls? ( rust-src )
test? ( ${ALL_LLVM_TARGETS[*]} )
wasm? ( llvm_targets_WebAssembly )
x86? ( cpu_flags_x86_sse2 )
@@ -277,11 +278,14 @@ src_configure() {
tools="\"miri\",$tools"
fi
if use rls; then
- tools="\"rls\",\"analysis\",\"src\",$tools"
+ tools="\"rls\",\"analysis\",$tools"
fi
if use rustfmt; then
tools="\"rustfmt\",$tools"
fi
+ if use rust-src; then
+ tools="\"src\",$tools"
+ fi
local rust_stage0_root
if use system-bootstrap; then