From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B0A7E138334 for ; Thu, 15 Nov 2018 09:29:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6FBF5E0A7C; Thu, 15 Nov 2018 09:29:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3AF21E0A7C for ; Thu, 15 Nov 2018 09:29:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C54EA335C3D for ; Thu, 15 Nov 2018 09:29:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 00ACE44F for ; Thu, 15 Nov 2018 09:29:17 +0000 (UTC) From: "Dirkjan Ochtman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Dirkjan Ochtman" Message-ID: <1542274065.3a5b9598e49664cf3b11fb276adae40093c40d9e.djc@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust/metadata.xml dev-lang/rust/rust-1.30.1-r1.ebuild X-VCS-Directories: dev-lang/rust/ X-VCS-Committer: djc X-VCS-Committer-Name: Dirkjan Ochtman X-VCS-Revision: 3a5b9598e49664cf3b11fb276adae40093c40d9e X-VCS-Branch: master Date: Thu, 15 Nov 2018 09:29:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 25259942-8e2e-42cd-a262-78174d524639 X-Archives-Hash: 63ea25fabfca7f67b332feea6708a4d4 commit: 3a5b9598e49664cf3b11fb276adae40093c40d9e Author: Dirkjan Ochtman gentoo org> AuthorDate: Thu Nov 15 09:27:27 2018 +0000 Commit: Dirkjan Ochtman gentoo org> CommitDate: Thu Nov 15 09:27:45 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a5b9598 dev-lang/rust: fix inconsistency, optionally use system LLVM Fixes: https://bugs.gentoo.org/663240 Signed-off-by: Dirkjan Ochtman gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 dev-lang/rust/metadata.xml | 1 + dev-lang/rust/rust-1.30.1-r1.ebuild | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml index c6a534bebad..cd1133751de 100644 --- a/dev-lang/rust/metadata.xml +++ b/dev-lang/rust/metadata.xml @@ -8,6 +8,7 @@ Install cargo component Install clippy component + Use the system LLVM install Install rls component Install rustfmt component Build support for the wasm32-unknown-unknown diff --git a/dev-lang/rust/rust-1.30.1-r1.ebuild b/dev-lang/rust/rust-1.30.1-r1.ebuild index 17118cfdb50..39efcc08a62 100644 --- a/dev-lang/rust/rust-1.30.1-r1.ebuild +++ b/dev-lang/rust/rust-1.30.1-r1.ebuild @@ -5,7 +5,7 @@ EAPI=6 PYTHON_COMPAT=( python2_7 python3_{5,6} pypy ) -inherit eapi7-ver multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs +inherit eapi7-ver llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs if [[ ${PV} = *beta* ]]; then betaver=${PV//*beta} @@ -36,7 +36,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 +jemalloc libressl rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}" +IUSE="clippy cpu_flags_x86_sse2 debug doc +jemalloc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}" COMMON_DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425 jemalloc? ( dev-libs/jemalloc ) @@ -45,7 +45,8 @@ COMMON_DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425 libressl? ( dev-libs/libressl:0= ) net-libs/libssh2 net-libs/http-parser:= - net-misc/curl[ssl]" + net-misc/curl[ssl] + system-llvm? ( >=sys-devel/llvm-6:= )" DEPEND="${COMMON_DEPEND} ${PYTHON_DEPS} || ( @@ -78,7 +79,7 @@ src_prepare() { } src_configure() { - local rust_target="" rust_targets="" rust_target_name arch_cflags + local rust_target="" rust_targets="" arch_cflags # Collect rust target names to compile standard libs for all ABIs. for v in $(multilib_get_enabled_abi_pairs); do @@ -110,6 +111,7 @@ src_configure() { release-debuginfo = $(toml_usex debug) assertions = $(toml_usex debug) targets = "${LLVM_TARGETS// /;}" + link-shared = $(toml_usex system-llvm) [build] build = "${rust_target}" host = ["${rust_target}"] @@ -140,7 +142,7 @@ src_configure() { EOF for v in $(multilib_get_enabled_abi_pairs); do - rust_target=$(get_abi_CHOST ${v##*.}) + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) arch_cflags="$(get_abi_CFLAGS ${v##*.})" cat <<- EOF >> "${S}"/config.env @@ -154,6 +156,11 @@ src_configure() { linker = "$(tc-getCC)" ar = "$(tc-getAR)" EOF + if use system-llvm; then + cat <<- EOF >> "${S}"/config.toml + llvm-config = "$(get_llvm_prefix)/bin/llvm-config" + EOF + fi done if use wasm; then @@ -200,10 +207,9 @@ src_install() { continue fi abi_libdir=$(get_abi_LIBDIR ${v##*.}) - rust_target=$(get_abi_CHOST ${v##*.}) - rust_abi=$(rust_abi $rust_target) + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) mkdir -p "${D}/usr/${abi_libdir}" - cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_abi}/lib"/*.so \ + cp "${D}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/lib"/*.so \ "${D}/usr/${abi_libdir}" || die done