commit: fb6c4a46c1a0cfbacd4f96041a27e9a78d9eea23
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Nov 17 08:49:11 2022 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Nov 17 09:00:01 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb6c4a46
www-client/firefox: use llvm.eclass to check for correct llvm/rust tc
- committers note: this reverts the dirty hacks, as the functionality is found
from llvm.eclass - just needed out-of-the-box thinking.
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
www-client/firefox/firefox-102.5.0.ebuild | 21 +++++++--------------
www-client/firefox/firefox-107.0.ebuild | 16 ++++++++++------
2 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/www-client/firefox/firefox-102.5.0.ebuild
b/www-client/firefox/firefox-102.5.0.ebuild
index 03144da28805..a147b671f476 100644
--- a/www-client/firefox/firefox-102.5.0.ebuild
+++ b/www-client/firefox/firefox-102.5.0.ebuild
@@ -97,8 +97,8 @@ BDEPEND="${PYTHON_DEPS}
sys-devel/clang:14
sys-devel/llvm:14
clang? (
- virtual/rust:0/llvm-14
sys-devel/lld:14
+ virtual/rust:0/llvm-14
pgo? (
=sys-libs/compiler-rt-sanitizers-14*[profile] )
)
)
@@ -108,7 +108,7 @@ BDEPEND="${PYTHON_DEPS}
>=dev-util/cbindgen-0.24.3
net-libs/nodejs
virtual/pkgconfig
- virtual/rust
+ !clang? ( virtual/rust )
amd64? ( >=dev-lang/nasm-2.14 )
x86? ( >=dev-lang/nasm-2.14 )"
@@ -218,6 +218,11 @@ llvm_check_deps() {
return 1
fi
+ if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then
+ einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing!
Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
if use pgo ; then
if ! has_version -b
"=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then
einfo
"=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing! Cannot use
LLVM slot ${LLVM_SLOT} ... Please try emerge -1av
=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}* with profile use flag on!" >&2
@@ -443,18 +448,6 @@ pkg_setup() {
check-reqs_pkg_setup
- # Attempt to force a specific llvm/clang/lld with multiple llvm
toolchain slots installed.
- if use clang; then
- local LLVM_USE_SLOT=${LLVM_MAX_SLOT}
- if ! has_version -b
"virtual/rust:0/llvm-${LLVM_USE_SLOT}"; then
- ((LLVM_USE_SLOT -= 1))
- if ! has_version -b
"virtual/rust:0/llvm-${LLVM_USE_SLOT}"; then
- die "Couldn't find
virtual/rust:0/llvm-${LLVM_MAX_SLOT} or virtual/rust:0/llvm-${LLVM_USE_SLOT}.
Check your virtual/rust installation."
- fi
- fi
- local LLVM_MAX_SLOT=${LLVM_USE_SLOT}
- fi
-
llvm_pkg_setup
if use clang && use lto ; then
diff --git a/www-client/firefox/firefox-107.0.ebuild
b/www-client/firefox/firefox-107.0.ebuild
index 9e3ee21d03b8..71eb99bd7b77 100644
--- a/www-client/firefox/firefox-107.0.ebuild
+++ b/www-client/firefox/firefox-107.0.ebuild
@@ -89,6 +89,7 @@ BDEPEND="${PYTHON_DEPS}
sys-devel/llvm:15
clang? (
sys-devel/lld:15
+ virtual/rust:0/llvm-15
pgo? (
=sys-libs/compiler-rt-sanitizers-15*[profile] )
)
)
@@ -97,19 +98,17 @@ BDEPEND="${PYTHON_DEPS}
sys-devel/llvm:14
clang? (
sys-devel/lld:14
+ virtual/rust:0/llvm-14
pgo? (
=sys-libs/compiler-rt-sanitizers-14*[profile] )
)
)
)
- || (
- virtual/rust:0/llvm-15
- virtual/rust:0/llvm-14
- )
app-arch/unzip
app-arch/zip
>=dev-util/cbindgen-0.24.3
net-libs/nodejs
virtual/pkgconfig
+ !clang? ( virtual/rust )
amd64? ( >=dev-lang/nasm-2.14 )
x86? ( >=dev-lang/nasm-2.14 )
pgo? (
@@ -234,9 +233,14 @@ llvm_check_deps() {
return 1
fi
+ if ! has_version -b "virtual/rust:0/llvm-${LLVM_SLOT}" ; then
+ einfo "virtual/rust:0/llvm-${LLVM_SLOT} is missing!
Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
if use pgo ; then
- if ! has_version -b
"=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*" ; then
- einfo
"=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}* is missing! Cannot use LLVM
slot ${LLVM_SLOT} ..." >&2
+ if ! has_version -b
"=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile]" ; then
+ einfo
"=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*[profile] is missing! Cannot use
LLVM slot ${LLVM_SLOT} ..." >&2
return 1
fi
fi