diff options
| author | Z. Liu <zhixu.liu@gmail.com> | 2024-12-08 15:59:37 +0800 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-01-18 17:31:54 +0000 |
| commit | 3d841904ebfe01e74cb01eae6456b30f6aeca7e8 (patch) | |
| tree | 3fbdd3e1c65781af1e40537c2481b0be427af1fa /dev-lang/rust/rust-1.75.0-r100.ebuild | |
| parent | 8eb27eaf78702cdd85b2b62d2da804157c3b9682 (diff) | |
| download | gentoo-3d841904ebfe01e74cb01eae6456b30f6aeca7e8.tar.gz gentoo-3d841904ebfe01e74cb01eae6456b30f6aeca7e8.tar.bz2 gentoo-3d841904ebfe01e74cb01eae6456b30f6aeca7e8.zip | |
dev-lang/rust: set experimental-targets according to USE
set experimental-targets to the intersection of USE and all experimental
targets, otherwise it will fails to build with messages like:
The target `......' is experimental and must be passed via
LLVM_EXPERIMENTAL_TARGETS_TO_BUILD.
Closes: https://bugs.gentoo.org/921683
Closes: https://bugs.gentoo.org/923066
Closes: https://bugs.gentoo.org/930921
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38378
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/rust/rust-1.75.0-r100.ebuild')
| -rw-r--r-- | dev-lang/rust/rust-1.75.0-r100.ebuild | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dev-lang/rust/rust-1.75.0-r100.ebuild b/dev-lang/rust/rust-1.75.0-r100.ebuild index 32f8d4d41fe3..478f58c567f0 100644 --- a/dev-lang/rust/rust-1.75.0-r100.ebuild +++ b/dev-lang/rust/rust-1.75.0-r100.ebuild @@ -39,6 +39,8 @@ ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} +ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY DirectX M68k SPIRV Xtensa ) + LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV}" @@ -261,6 +263,14 @@ src_configure() { rust_build="$(rust_abi "${CBUILD}")" rust_host="$(rust_abi "${CHOST}")" + LLVM_EXPERIMENTAL_TARGETS=() + for _x in "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}"; do + if use llvm_targets_${_x} ; then + LLVM_EXPERIMENTAL_TARGETS+=( ${_x} ) + fi + done + LLVM_EXPERIMENTAL_TARGETS=${LLVM_EXPERIMENTAL_TARGETS[@]} + local cm_btype="$(usex debug DEBUG RELEASE)" cat <<- _EOF_ > "${S}"/config.toml changelog-seen = 2 @@ -271,7 +281,7 @@ src_configure() { assertions = $(toml_usex debug) ninja = true targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" + experimental-targets = "${LLVM_EXPERIMENTAL_TARGETS// /;}" link-shared = $(toml_usex system-llvm) $(if is_libcxx_linked; then # https://bugs.gentoo.org/732632 |
