summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/rust/rust-1.61.0-r1.ebuild')
-rw-r--r--dev-lang/rust/rust-1.61.0-r1.ebuild13
1 files changed, 12 insertions, 1 deletions
diff --git a/dev-lang/rust/rust-1.61.0-r1.ebuild b/dev-lang/rust/rust-1.61.0-r1.ebuild
index 2e877f2f2bdd..250c7e2f1db2 100644
--- a/dev-lang/rust/rust-1.61.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.61.0-r1.ebuild
@@ -259,7 +259,7 @@ src_prepare() {
}
src_configure() {
- local rust_target="" rust_targets="" arch_cflags
+ local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
# Collect rust target names to compile standard libs for all ABIs.
for v in $(multilib_get_enabled_abi_pairs); do
@@ -308,6 +308,14 @@ src_configure() {
rust_target="$(rust_abi)"
+ # https://bugs.gentoo.org/732632
+ if tc-is-clang; then
+ local clang_slot="$(clang-major-version)"
+ if { has_version "sys-devel/clang:${clang_slot}[default-libcxx]" || is-flagq -stdlib=libc++; }; then
+ use_libcxx="true"
+ fi
+ fi
+
cat <<- _EOF_ > "${S}"/config.toml
changelog-seen = 2
[llvm]
@@ -319,6 +327,7 @@ src_configure() {
targets = "${LLVM_TARGETS// /;}"
experimental-targets = ""
link-shared = $(toml_usex system-llvm)
+ use-libcxx = ${use_libcxx}
$(case "${rust_target}" in
i586-*-linux-*)
# https://github.com/rust-lang/rust/issues/93059
@@ -326,6 +335,8 @@ src_configure() {
echo 'cxxflags = "-fcf-protection=none"'
echo 'ldflags = "-fcf-protection=none"'
;;
+ *)
+ ;;
esac)
[build]
build-stage = 2