commit: 74225b53bf6c9c01b7f80b4dc47f8046db125802 Author: orbea <orbea <AT> riseup <DOT> net> AuthorDate: Wed Jun 1 22:36:17 2022 +0000 Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com> CommitDate: Thu Jun 2 01:44:04 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=74225b53
dev-lang/rust: Update ebuilds Reduces the diff with the gentoo repo. Signed-off-by: orbea <orbea <AT> riseup.net> Closes: https://github.com/gentoo/libressl/pull/414 Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com> dev-lang/rust/metadata.xml | 13 ++++++++----- dev-lang/rust/rust-1.59.0.ebuild | 6 +++--- dev-lang/rust/rust-1.60.0.ebuild | 19 ++++++++++++++----- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml index 1e4ffdc..7219757 100644 --- a/dev-lang/rust/metadata.xml +++ b/dev-lang/rust/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>[email protected]</email> @@ -11,13 +11,16 @@ </maintainer> <use> <flag name="clippy">Install clippy, Rust code linter</flag> - <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</flag> + <flag name="dist">Install dist tarballs (used for bootstrapping)</flag> + <flag name="miri">Install miri, an interpreter for Rust's mid-level intermediate representation (requires USE=nightly, sometimes is broken)</flag> + <flag name="nightly">Enable nightly (UNSTABLE) features (NOTE: it does not install nightly version, just enables features marked as nightly at time of release)</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> <flag name="system-bootstrap">Bootstrap using installed rust compiler</flag> - <flag name="system-llvm">Use the system LLVM install</flag> + <flag name="system-llvm">Use the system LLVM installation</flag> <flag name="wasm">Build support for the wasm32-unknown-unknown target</flag> </use> </pkgmetadata> diff --git a/dev-lang/rust/rust-1.59.0.ebuild b/dev-lang/rust/rust-1.59.0.ebuild index bb48968..33eb0ea 100644 --- a/dev-lang/rust/rust-1.59.0.ebuild +++ b/dev-lang/rust/rust-1.59.0.ebuild @@ -192,10 +192,10 @@ bootstrap_rust_version_check() { } pre_build_checks() { - local M=4096 - # multiply requirements by 1.5 if we are doing x86-multilib + local M=8192 + # multiply requirements by 1.3 if we are doing x86-multilib if use amd64; then - M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 )) + M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 )) fi M=$(( $(usex clippy 128 0) + ${M} )) M=$(( $(usex miri 128 0) + ${M} )) diff --git a/dev-lang/rust/rust-1.60.0.ebuild b/dev-lang/rust/rust-1.60.0.ebuild index 65daf58..a1a5c44 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 @@ -190,10 +190,10 @@ bootstrap_rust_version_check() { } pre_build_checks() { - local M=4096 - # multiply requirements by 1.5 if we are doing x86-multilib + local M=8192 + # multiply requirements by 1.3 if we are doing x86-multilib if use amd64; then - M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 )) + M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 )) fi M=$(( $(usex clippy 128 0) + ${M} )) M=$(( $(usex miri 128 0) + ${M} )) @@ -280,6 +280,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 @@ -342,7 +345,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}" @@ -418,6 +421,8 @@ src_configure() { if use wasm; then cat <<- _EOF_ >> "${S}"/config.toml [target.wasm32-unknown-unknown] + # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483 + profiler = false linker = "$(usex system-llvm lld rust-lld)" _EOF_ fi @@ -606,6 +611,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 ) @@ -665,6 +671,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
