public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2024-12-12  5:03 Sam James
  0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2024-12-12  5:03 UTC (permalink / raw
  To: gentoo-commits

commit:     4941157a1238fa6731195b029cdd04b35abe2262
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 12 04:58:46 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 12 04:58:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4941157a

llvm-runtimes/compiler-rt-sanitizers: Stabilize 18.1.8-r6 arm64, #946220

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
index cdf8b9fb7ed3..7ed9e612dc4e 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="${LLVM_MAJOR}"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="~amd64 ~arm arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
 IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
 # base targets
 IUSE+=" +libfuzzer +memprof +orc +profile +xray"


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2024-12-12  5:03 Sam James
  0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2024-12-12  5:03 UTC (permalink / raw
  To: gentoo-commits

commit:     7c0f7fff3167ccc35c3e655b2484b0153e849e9d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 12 04:58:49 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 12 04:58:49 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c0f7fff

llvm-runtimes/compiler-rt-sanitizers: Stabilize 18.1.8-r6 ppc64, #946220

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
index 7ed9e612dc4e..d95668e31e69 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="${LLVM_MAJOR}"
-KEYWORDS="~amd64 ~arm arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="~amd64 ~arm arm64 ~loong ~mips ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
 IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
 # base targets
 IUSE+=" +libfuzzer +memprof +orc +profile +xray"


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2024-12-12  5:03 Sam James
  0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2024-12-12  5:03 UTC (permalink / raw
  To: gentoo-commits

commit:     f43205ff4e20a291de2fbf2087d47a3546411f4d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 12 05:01:14 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 12 05:01:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f43205ff

llvm-runtimes/compiler-rt-sanitizers: Stabilize 18.1.8-r6 amd64, #946220

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
index d95668e31e69..4d8894c3b454 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="${LLVM_MAJOR}"
-KEYWORDS="~amd64 ~arm arm64 ~loong ~mips ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="amd64 ~arm arm64 ~loong ~mips ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
 IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
 # base targets
 IUSE+=" +libfuzzer +memprof +orc +profile +xray"


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2024-12-12  5:03 Sam James
  0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2024-12-12  5:03 UTC (permalink / raw
  To: gentoo-commits

commit:     c576605a6e59f38b748f639995d780d703cedf19
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 12 05:01:20 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 12 05:01:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c576605a

llvm-runtimes/compiler-rt-sanitizers: Stabilize 18.1.8-r6 x86, #946220

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
index e56f3155ecd5..8a734d4c9ef2 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="${LLVM_MAJOR}"
-KEYWORDS="amd64 arm arm64 ~loong ~mips ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="amd64 arm arm64 ~loong ~mips ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
 IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
 # base targets
 IUSE+=" +libfuzzer +memprof +orc +profile +xray"


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2024-12-12  5:03 Sam James
  0 siblings, 0 replies; 27+ messages in thread
From: Sam James @ 2024-12-12  5:03 UTC (permalink / raw
  To: gentoo-commits

commit:     1d29885d58168cfb5ab3c1e280c1396c5b902ee6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 12 05:01:17 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 12 05:01:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d29885d

llvm-runtimes/compiler-rt-sanitizers: Stabilize 18.1.8-r6 arm, #946220

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
index 4d8894c3b454..e56f3155ecd5 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r6.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="${LLVM_MAJOR}"
-KEYWORDS="amd64 ~arm arm64 ~loong ~mips ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="amd64 arm arm64 ~loong ~mips ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
 IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
 # base targets
 IUSE+=" +libfuzzer +memprof +orc +profile +xray"


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2024-12-12 12:27 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2024-12-12 12:27 UTC (permalink / raw
  To: gentoo-commits

commit:     a00d5a710f1daf1784da05e7ea871e997df06165
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 12 12:15:59 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Dec 12 12:15:59 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a00d5a71

llvm-runtimes/compiler-rt-sanitizers: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 -
 .../compiler-rt-sanitizers-18.1.8-r1.ebuild        | 221 ---------------------
 2 files changed, 222 deletions(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 382faaff82df..1350de59b780 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -1,7 +1,6 @@
 DIST llvm-gentoo-patchset-15.0.7-r6.tar.xz 25208 BLAKE2B c9fca31a053ee059c3060a94dcf675d472fc1a59b5f927648de58fb4ff20bfc229890f789ed47b3d053bd466b860a0c60a53b4b024a8fe18c776e9a72434d6de SHA512 601cd923711839dca7cb5bfea53ded644777c6340265a797939a53409fd2ca27059a015fd6ca6832e60314699ade27919a9a59dab395cc27f8fdc479a0f3c034
 DIST llvm-gentoo-patchset-16.0.6-r5.tar.xz 19728 BLAKE2B 36b605401893034b2b560d26cfb57512c81eddbc35b25d9c3d1fe051b8825c38cae1b8ed999faf8fef564ca5578402d3979bc56ba0a5514dc62594d893696f41 SHA512 20a36b69dfc2b4796ce33318a28529ebdc213945ee67a983e4218117d2ee2c93be1ecb38b0e8189249c5806a442cba708e0890e1b7bf6376edec4403bcc71425
 DIST llvm-gentoo-patchset-17.0.6-r3.tar.xz 4648 BLAKE2B c709162068e83575f71a2ac2243665f47a3d42cac078daa5762bbd339d8593e8c1c5c58e2e415ba6659fe2f3c3824bd098c9be579103362084079140c0386f76 SHA512 251a33f146fcbdbe51c9e1ad7b08c2cd7d062d0b136c833cda8a5155c86080c506d575e4288cde4ba8530ca7f230c2afa63621878a8df0f23076a93c924e7d65
-DIST llvm-gentoo-patchset-18.1.8-r4.tar.xz 15912 BLAKE2B 7300128244aafe42fcf5863e3aad2beb0c96c3df527e6d35fe571369bad520ba4aa397a329287da17eb33dca902057da5cd5193ec560ea7f5767ba2d00a45818 SHA512 b32633db387d4adb3bb2d067f824ae4e8e8a24a25aaa4888520f6e61a4bb1f8f70ad5f44057fbc0892c6f93c803e360612b0fc02c4ec068470b546a55f246cba
 DIST llvm-gentoo-patchset-18.1.8-r6.tar.xz 24816 BLAKE2B a7e9e007b05205fa7adba032ba932eba1996dd7ed6cd4cfb460a731f0d2e5fda2174f46c2ee5554ca7f82297a4baddbabc7fdfbd530056471853df957c221f2f SHA512 e1666bba6678eff3ee3666818a656ba7b8f964acb8466bd220bfbf0cc2922820e84b9daaa84c3a8ed26f3160fddea63fbc13872b007eb6922eaee462c08aeaef
 DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
 DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r1.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r1.ebuild
deleted file mode 100644
index f1b0745db2b7..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-18.1.8-r1.ebuild
+++ /dev/null
@@ -1,221 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-KEYWORDS="amd64 arm arm64 ~loong ~mips ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
-# base targets
-IUSE+=" +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_PATCHSET=${PV}-r4
-LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2024-12-16  5:57 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2024-12-16  5:57 UTC (permalink / raw
  To: gentoo-commits

commit:     505e1d133a5e46008189b362c871e8bc09ba5d4c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 20:12:16 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Dec 16 05:55:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=505e1d13

llvm-runtimes/compiler-rt-sanitizers: Add 20.0.0_pre20241215 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 +
 ...ompiler-rt-sanitizers-20.0.0_pre20241215.ebuild | 222 +++++++++++++++++++++
 2 files changed, 223 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 1350de59b780..193aa120c60f 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -15,3 +15,4 @@ DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e2
 DIST llvm-project-19.1.5.src.tar.xz 141243716 BLAKE2B 228fc66ab688abfc16f31b2cd83163b81ef61604ace21eab69a1776f0dc88cbe8fa831162205849e5be3975a214136399572b4ad1b908986e37b2d38a1a7fa5d SHA512 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22
 DIST llvm-project-19.1.5.src.tar.xz.sig 438 BLAKE2B 1d40a5c5405f99ef86e3360f9ea153afd1ae4001697210fd799a988113e8a3cef39e2c4794edd9332f384d8490f4ce2ab6bee6d98f794f84775807f833b81c0a SHA512 a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54
 DIST llvm-project-32f7f0010bca99ee4bd917f57272733fb2bf3bd9.tar.gz 223983502 BLAKE2B fd3e6b0b795abc42568ef98fa774d927029c18838a5d0f34eaa66c37976444a63f2fc5d883f3bf3a98533f51e387936f1c659230f31c757d26153425696a16cd SHA512 65a345ad5b77c627008f759947e5e9f28a62c8992d7146113e0446e5849feaf9088c15c8b22ca0824af5b927d6a417f5326258b489fb8ccea78ec9e0e0fe8fba
+DIST llvm-project-49a5ad8e5714fd404210279303acc97b495d66d0.tar.gz 224456065 BLAKE2B 0077b9d37c479ac6190cc4b897cc35d6f1f3e6a772cd0620bcb1006afc19377e9968e38fb9d9adffe316e85290c9045deecbf9bf62b440c55968634b442edb31 SHA512 45d779eb27c230f656fda47c85127381cab8c8f7f75d77411c6960269f8aad5fa3c99c024a98ab8a349da1c88ad9d892cc82f91a6f344b791b281449031ae49a

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241215.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241215.ebuild
new file mode 100644
index 000000000000..cea1ae243486
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241215.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2024-12-17 21:37 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2024-12-17 21:37 UTC (permalink / raw
  To: gentoo-commits

commit:     8e6e8f4c09da2ff2cded2cce8299cbdef3550394
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 17 21:34:34 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Dec 17 21:37:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e6e8f4c

llvm-runtimes/compiler-rt-sanitizers: Add 19.1.6

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   2 +
 .../compiler-rt-sanitizers-19.1.6.ebuild           | 223 +++++++++++++++++++++
 2 files changed, 225 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 193aa120c60f..3d5c808b0e19 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -14,5 +14,7 @@ DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d22
 DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764
 DIST llvm-project-19.1.5.src.tar.xz 141243716 BLAKE2B 228fc66ab688abfc16f31b2cd83163b81ef61604ace21eab69a1776f0dc88cbe8fa831162205849e5be3975a214136399572b4ad1b908986e37b2d38a1a7fa5d SHA512 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22
 DIST llvm-project-19.1.5.src.tar.xz.sig 438 BLAKE2B 1d40a5c5405f99ef86e3360f9ea153afd1ae4001697210fd799a988113e8a3cef39e2c4794edd9332f384d8490f4ce2ab6bee6d98f794f84775807f833b81c0a SHA512 a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54
+DIST llvm-project-19.1.6.src.tar.xz 141248428 BLAKE2B b35ab0c754f28c850ac6fd4ee584e963b1d5cf06885c59827ee4ac11f93cde5b8e0268fbed560839137de2c495c9da2b889331cd12a8a02958d8e0cbdbed2607 SHA512 d411a6d913d6a1e1f3c16cfc1ce81c1e6292ea370703f55fb67c7af62f02193d53f5ef7823c8679d6f25cbe47b40236fcaf37044ad7cdfada8166efe7eb106b3
+DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9edee115385181781c8100f14ec80061d7888ee4c4c519297a0e89b9c7ab2203aa9d5bb3084ea1d0f0024c2acf84826fd370b SHA512 8e79a39a4f54da3579794f9b5a009ea8ee56c7bc1805187274794ce56e81aa492ea93f5c7839a59beedcf7d657acded5ecb75d5803658cce1f9e8f753439c6c4
 DIST llvm-project-32f7f0010bca99ee4bd917f57272733fb2bf3bd9.tar.gz 223983502 BLAKE2B fd3e6b0b795abc42568ef98fa774d927029c18838a5d0f34eaa66c37976444a63f2fc5d883f3bf3a98533f51e387936f1c659230f31c757d26153425696a16cd SHA512 65a345ad5b77c627008f759947e5e9f28a62c8992d7146113e0446e5849feaf9088c15c8b22ca0824af5b927d6a417f5326258b489fb8ccea78ec9e0e0fe8fba
 DIST llvm-project-49a5ad8e5714fd404210279303acc97b495d66d0.tar.gz 224456065 BLAKE2B 0077b9d37c479ac6190cc4b897cc35d6f1f3e6a772cd0620bcb1006afc19377e9968e38fb9d9adffe316e85290c9045deecbf9bf62b440c55968634b442edb31 SHA512 45d779eb27c230f656fda47c85127381cab8c8f7f75d77411c6960269f8aad5fa3c99c024a98ab8a349da1c88ad9d892cc82f91a6f344b791b281449031ae49a

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.6.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.6.ebuild
new file mode 100644
index 000000000000..d859114a0b3d
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.6.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2024-12-21 10:28 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2024-12-21 10:28 UTC (permalink / raw
  To: gentoo-commits

commit:     028de7a80c277b26c65be78ba3d7d6f4709d9aed
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 21 10:10:52 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Dec 21 10:28:13 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=028de7a8

llvm-runtimes/compiler-rt-sanitizers: Add 20.0.0_pre20241221 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 +
 ...ompiler-rt-sanitizers-20.0.0_pre20241221.ebuild | 222 +++++++++++++++++++++
 2 files changed, 223 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 3d5c808b0e19..e6dce33e60d2 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -18,3 +18,4 @@ DIST llvm-project-19.1.6.src.tar.xz 141248428 BLAKE2B b35ab0c754f28c850ac6fd4ee5
 DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9edee115385181781c8100f14ec80061d7888ee4c4c519297a0e89b9c7ab2203aa9d5bb3084ea1d0f0024c2acf84826fd370b SHA512 8e79a39a4f54da3579794f9b5a009ea8ee56c7bc1805187274794ce56e81aa492ea93f5c7839a59beedcf7d657acded5ecb75d5803658cce1f9e8f753439c6c4
 DIST llvm-project-32f7f0010bca99ee4bd917f57272733fb2bf3bd9.tar.gz 223983502 BLAKE2B fd3e6b0b795abc42568ef98fa774d927029c18838a5d0f34eaa66c37976444a63f2fc5d883f3bf3a98533f51e387936f1c659230f31c757d26153425696a16cd SHA512 65a345ad5b77c627008f759947e5e9f28a62c8992d7146113e0446e5849feaf9088c15c8b22ca0824af5b927d6a417f5326258b489fb8ccea78ec9e0e0fe8fba
 DIST llvm-project-49a5ad8e5714fd404210279303acc97b495d66d0.tar.gz 224456065 BLAKE2B 0077b9d37c479ac6190cc4b897cc35d6f1f3e6a772cd0620bcb1006afc19377e9968e38fb9d9adffe316e85290c9045deecbf9bf62b440c55968634b442edb31 SHA512 45d779eb27c230f656fda47c85127381cab8c8f7f75d77411c6960269f8aad5fa3c99c024a98ab8a349da1c88ad9d892cc82f91a6f344b791b281449031ae49a
+DIST llvm-project-665d79f2e967a5eee6fff93685e45f50cf24cab2.tar.gz 224186302 BLAKE2B 6d4a02b6cfaf53324161c43ed02024f0fea0e7de25a9150cc0168602d7dff3f618026fa8318aa6e03904a9424afa1f12c5eb33bfdfa82e72210f34e5829a7804 SHA512 7482e176b1e2389b0dd0e67271cdb0489e9db0595874408156a034b40d336ecd960c63b89c237ca22eee3650880b0f08a97de14f8a17c918245915d422e568c9

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241221.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241221.ebuild
new file mode 100644
index 000000000000..cea1ae243486
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241221.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2024-12-27 21:25 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2024-12-27 21:25 UTC (permalink / raw
  To: gentoo-commits

commit:     74452f5cd80a3a5750dbda2079a26c9f74bcc6ed
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 27 20:37:45 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Dec 27 21:25:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74452f5c

llvm-runtimes/compiler-rt-sanitizers: Add 20.0.0_pre20241227 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 +
 ...ompiler-rt-sanitizers-20.0.0_pre20241227.ebuild | 222 +++++++++++++++++++++
 2 files changed, 223 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index e6dce33e60d2..15f0f0b11339 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -19,3 +19,4 @@ DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9
 DIST llvm-project-32f7f0010bca99ee4bd917f57272733fb2bf3bd9.tar.gz 223983502 BLAKE2B fd3e6b0b795abc42568ef98fa774d927029c18838a5d0f34eaa66c37976444a63f2fc5d883f3bf3a98533f51e387936f1c659230f31c757d26153425696a16cd SHA512 65a345ad5b77c627008f759947e5e9f28a62c8992d7146113e0446e5849feaf9088c15c8b22ca0824af5b927d6a417f5326258b489fb8ccea78ec9e0e0fe8fba
 DIST llvm-project-49a5ad8e5714fd404210279303acc97b495d66d0.tar.gz 224456065 BLAKE2B 0077b9d37c479ac6190cc4b897cc35d6f1f3e6a772cd0620bcb1006afc19377e9968e38fb9d9adffe316e85290c9045deecbf9bf62b440c55968634b442edb31 SHA512 45d779eb27c230f656fda47c85127381cab8c8f7f75d77411c6960269f8aad5fa3c99c024a98ab8a349da1c88ad9d892cc82f91a6f344b791b281449031ae49a
 DIST llvm-project-665d79f2e967a5eee6fff93685e45f50cf24cab2.tar.gz 224186302 BLAKE2B 6d4a02b6cfaf53324161c43ed02024f0fea0e7de25a9150cc0168602d7dff3f618026fa8318aa6e03904a9424afa1f12c5eb33bfdfa82e72210f34e5829a7804 SHA512 7482e176b1e2389b0dd0e67271cdb0489e9db0595874408156a034b40d336ecd960c63b89c237ca22eee3650880b0f08a97de14f8a17c918245915d422e568c9
+DIST llvm-project-ccfe0de0e1e37ed369c9bf89dd0188ba0afb2e9a.tar.gz 224396427 BLAKE2B 6e13c65d2ba83fdaf2db20a58b878106568406f07f9c2ceb47e4d2572fb041211384ed67c43801764060101ec4a1b04c18bf4097f37512d2751aa5860c1a8dc3 SHA512 ef4512b735568aaa627a7f4e9bac3fc4722db7a2b8bd1610faaf066856be9474fb297fd75b3c0dcc76f60ab35c3110fd329faad3e8d9b75e93844d56f41c03d1

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241227.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241227.ebuild
new file mode 100644
index 000000000000..cea1ae243486
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241227.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2024-12-28 19:35 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2024-12-28 19:35 UTC (permalink / raw
  To: gentoo-commits

commit:     a257a927539cd65b5e2f0b241b97bb11533bd978
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 28 19:33:11 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Dec 28 19:33:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a257a927

llvm-runtimes/compiler-rt-sanitizers: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   5 -
 .../compiler-rt-sanitizers-19.1.5.ebuild           | 223 ---------------------
 ...ompiler-rt-sanitizers-20.0.0_pre20241207.ebuild | 222 --------------------
 ...ompiler-rt-sanitizers-20.0.0_pre20241215.ebuild | 222 --------------------
 ...ompiler-rt-sanitizers-20.0.0_pre20241221.ebuild | 222 --------------------
 5 files changed, 894 deletions(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 15f0f0b11339..2109bd8d5961 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -12,11 +12,6 @@ DIST llvm-project-18.1.8.src.tar.xz 132067260 BLAKE2B a950492f1dbfb874dff63b1ffe
 DIST llvm-project-18.1.8.src.tar.xz.sig 566 BLAKE2B 6ab0efc5b38d4483f4e32e8b85774b2edd5d88fdf29f23b88eb0b5130a7a7f0e80549612b025f927e92de4a08ff7c292cff224dbda91a5d598244e98f7ad0fbd SHA512 ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b
 DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d2250268df36fb94fa0fd5b3611484094fbd7962051978334d2c623d2ff5a0209dbb2c6c6492be0146507ae982a7d3e9705a689c5 SHA512 a586f8a41dde5e0d9ca6d8c58e9ef2a2e59b70a86d2e2c46106dc31b5c096bb80af0cdbdb486179e9cc676a540099f49a1c2db9e5e84c50362db1f72e9af6906
 DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764
-DIST llvm-project-19.1.5.src.tar.xz 141243716 BLAKE2B 228fc66ab688abfc16f31b2cd83163b81ef61604ace21eab69a1776f0dc88cbe8fa831162205849e5be3975a214136399572b4ad1b908986e37b2d38a1a7fa5d SHA512 648854e9c91fdcc5c677ce3800e046f2060b998a45cf9f7eebe02898431b3924f9348b6fc366102cd4fdda72dcb8f32076f98aa69927e0e20b3f1007fba10b22
-DIST llvm-project-19.1.5.src.tar.xz.sig 438 BLAKE2B 1d40a5c5405f99ef86e3360f9ea153afd1ae4001697210fd799a988113e8a3cef39e2c4794edd9332f384d8490f4ce2ab6bee6d98f794f84775807f833b81c0a SHA512 a438c86ce882eb1ac3e50842937068794ed162bb1b7ded68a2fe3ec2ab4f57cc38aee667cfb46afe6da22eef7ed1cb65820a473f63bd5a0dc6aad41df7bfad54
 DIST llvm-project-19.1.6.src.tar.xz 141248428 BLAKE2B b35ab0c754f28c850ac6fd4ee584e963b1d5cf06885c59827ee4ac11f93cde5b8e0268fbed560839137de2c495c9da2b889331cd12a8a02958d8e0cbdbed2607 SHA512 d411a6d913d6a1e1f3c16cfc1ce81c1e6292ea370703f55fb67c7af62f02193d53f5ef7823c8679d6f25cbe47b40236fcaf37044ad7cdfada8166efe7eb106b3
 DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9edee115385181781c8100f14ec80061d7888ee4c4c519297a0e89b9c7ab2203aa9d5bb3084ea1d0f0024c2acf84826fd370b SHA512 8e79a39a4f54da3579794f9b5a009ea8ee56c7bc1805187274794ce56e81aa492ea93f5c7839a59beedcf7d657acded5ecb75d5803658cce1f9e8f753439c6c4
-DIST llvm-project-32f7f0010bca99ee4bd917f57272733fb2bf3bd9.tar.gz 223983502 BLAKE2B fd3e6b0b795abc42568ef98fa774d927029c18838a5d0f34eaa66c37976444a63f2fc5d883f3bf3a98533f51e387936f1c659230f31c757d26153425696a16cd SHA512 65a345ad5b77c627008f759947e5e9f28a62c8992d7146113e0446e5849feaf9088c15c8b22ca0824af5b927d6a417f5326258b489fb8ccea78ec9e0e0fe8fba
-DIST llvm-project-49a5ad8e5714fd404210279303acc97b495d66d0.tar.gz 224456065 BLAKE2B 0077b9d37c479ac6190cc4b897cc35d6f1f3e6a772cd0620bcb1006afc19377e9968e38fb9d9adffe316e85290c9045deecbf9bf62b440c55968634b442edb31 SHA512 45d779eb27c230f656fda47c85127381cab8c8f7f75d77411c6960269f8aad5fa3c99c024a98ab8a349da1c88ad9d892cc82f91a6f344b791b281449031ae49a
-DIST llvm-project-665d79f2e967a5eee6fff93685e45f50cf24cab2.tar.gz 224186302 BLAKE2B 6d4a02b6cfaf53324161c43ed02024f0fea0e7de25a9150cc0168602d7dff3f618026fa8318aa6e03904a9424afa1f12c5eb33bfdfa82e72210f34e5829a7804 SHA512 7482e176b1e2389b0dd0e67271cdb0489e9db0595874408156a034b40d336ecd960c63b89c237ca22eee3650880b0f08a97de14f8a17c918245915d422e568c9
 DIST llvm-project-ccfe0de0e1e37ed369c9bf89dd0188ba0afb2e9a.tar.gz 224396427 BLAKE2B 6e13c65d2ba83fdaf2db20a58b878106568406f07f9c2ceb47e4d2572fb041211384ed67c43801764060101ec4a1b04c18bf4097f37512d2751aa5860c1a8dc3 SHA512 ef4512b735568aaa627a7f4e9bac3fc4722db7a2b8bd1610faaf066856be9474fb297fd75b3c0dcc76f60ab35c3110fd329faad3e8d9b75e93844d56f41c03d1

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.5.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.5.ebuild
deleted file mode 100644
index d859114a0b3d..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.5.ebuild
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241207.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241207.ebuild
deleted file mode 100644
index cea1ae243486..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241207.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241215.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241215.ebuild
deleted file mode 100644
index cea1ae243486..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241215.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241221.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241221.ebuild
deleted file mode 100644
index a62e5e53e0c0..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241221.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan tysan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-01-04 15:28 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-01-04 15:28 UTC (permalink / raw
  To: gentoo-commits

commit:     506ac6d80fcae01de307f947ca7940bda2c9c550
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  4 15:07:50 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan  4 15:27:55 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=506ac6d8

llvm-runtimes/compiler-rt-sanitizers: Add 20.0.0_pre20250104 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 +
 ...ompiler-rt-sanitizers-20.0.0_pre20250104.ebuild | 222 +++++++++++++++++++++
 2 files changed, 223 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 2109bd8d5961..cc73a16067e9 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -14,4 +14,5 @@ DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d22
 DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764
 DIST llvm-project-19.1.6.src.tar.xz 141248428 BLAKE2B b35ab0c754f28c850ac6fd4ee584e963b1d5cf06885c59827ee4ac11f93cde5b8e0268fbed560839137de2c495c9da2b889331cd12a8a02958d8e0cbdbed2607 SHA512 d411a6d913d6a1e1f3c16cfc1ce81c1e6292ea370703f55fb67c7af62f02193d53f5ef7823c8679d6f25cbe47b40236fcaf37044ad7cdfada8166efe7eb106b3
 DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9edee115385181781c8100f14ec80061d7888ee4c4c519297a0e89b9c7ab2203aa9d5bb3084ea1d0f0024c2acf84826fd370b SHA512 8e79a39a4f54da3579794f9b5a009ea8ee56c7bc1805187274794ce56e81aa492ea93f5c7839a59beedcf7d657acded5ecb75d5803658cce1f9e8f753439c6c4
+DIST llvm-project-2529a8df53af9bc6cecfd6c83404ffa5e89e3370.tar.gz 224493461 BLAKE2B 0d3c757a8f34a9bf6b2ac0ad394cc1f8125cfee534c8bd0c5875eba56fe0171892586ec05b6f1e859e5962f81c76c9a315f60bcda012df73a3bd66709b265038 SHA512 a49fa1da2fd398b279a90292704e30d8ff7163219bfd91c4a80fa5123d957cdef52d2ee41710a8bcbfea3d9a5eec269dfc756584fcc27a495f7f381176de4e69
 DIST llvm-project-ccfe0de0e1e37ed369c9bf89dd0188ba0afb2e9a.tar.gz 224396427 BLAKE2B 6e13c65d2ba83fdaf2db20a58b878106568406f07f9c2ceb47e4d2572fb041211384ed67c43801764060101ec4a1b04c18bf4097f37512d2751aa5860c1a8dc3 SHA512 ef4512b735568aaa627a7f4e9bac3fc4722db7a2b8bd1610faaf066856be9474fb297fd75b3c0dcc76f60ab35c3110fd329faad3e8d9b75e93844d56f41c03d1

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250104.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250104.ebuild
new file mode 100644
index 000000000000..5efa81abbe9b
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250104.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-01-11 18:12 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-01-11 18:12 UTC (permalink / raw
  To: gentoo-commits

commit:     e3b9046916a36aac33da5bad49acf67ac8ba750b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 11 18:01:46 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 11 18:12:00 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3b90469

llvm-runtimes/compiler-rt-sanitizers: Add 20.0.0_pre20250111 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 +
 ...ompiler-rt-sanitizers-20.0.0_pre20250111.ebuild | 222 +++++++++++++++++++++
 2 files changed, 223 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index cc73a16067e9..9bba244eb8c2 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -15,4 +15,5 @@ DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e2
 DIST llvm-project-19.1.6.src.tar.xz 141248428 BLAKE2B b35ab0c754f28c850ac6fd4ee584e963b1d5cf06885c59827ee4ac11f93cde5b8e0268fbed560839137de2c495c9da2b889331cd12a8a02958d8e0cbdbed2607 SHA512 d411a6d913d6a1e1f3c16cfc1ce81c1e6292ea370703f55fb67c7af62f02193d53f5ef7823c8679d6f25cbe47b40236fcaf37044ad7cdfada8166efe7eb106b3
 DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9edee115385181781c8100f14ec80061d7888ee4c4c519297a0e89b9c7ab2203aa9d5bb3084ea1d0f0024c2acf84826fd370b SHA512 8e79a39a4f54da3579794f9b5a009ea8ee56c7bc1805187274794ce56e81aa492ea93f5c7839a59beedcf7d657acded5ecb75d5803658cce1f9e8f753439c6c4
 DIST llvm-project-2529a8df53af9bc6cecfd6c83404ffa5e89e3370.tar.gz 224493461 BLAKE2B 0d3c757a8f34a9bf6b2ac0ad394cc1f8125cfee534c8bd0c5875eba56fe0171892586ec05b6f1e859e5962f81c76c9a315f60bcda012df73a3bd66709b265038 SHA512 a49fa1da2fd398b279a90292704e30d8ff7163219bfd91c4a80fa5123d957cdef52d2ee41710a8bcbfea3d9a5eec269dfc756584fcc27a495f7f381176de4e69
+DIST llvm-project-8af4d206e0f979f68925a08f9dffd60a98ce97e2.tar.gz 224825146 BLAKE2B 36e9c8f9615d65fc72beb699c4ce5959676975267a4c4288a01009d26ab84ae411f2855e4e6475957b91ddc21da29251ab22e331395bc9fee0f9bc907a05384a SHA512 ec72cdd7cc6d9bef31ae9295606d18e4935468fe60ab632aced21261d437e76f11d83d0d7199a6028689990260d9155098f7d64e97db0e0af28ea6c75a773bcc
 DIST llvm-project-ccfe0de0e1e37ed369c9bf89dd0188ba0afb2e9a.tar.gz 224396427 BLAKE2B 6e13c65d2ba83fdaf2db20a58b878106568406f07f9c2ceb47e4d2572fb041211384ed67c43801764060101ec4a1b04c18bf4097f37512d2751aa5860c1a8dc3 SHA512 ef4512b735568aaa627a7f4e9bac3fc4722db7a2b8bd1610faaf066856be9474fb297fd75b3c0dcc76f60ab35c3110fd329faad3e8d9b75e93844d56f41c03d1

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250111.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250111.ebuild
new file mode 100644
index 000000000000..5efa81abbe9b
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250111.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-01-15  4:24 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-01-15  4:24 UTC (permalink / raw
  To: gentoo-commits

commit:     e0efa2b31bea43b87ca40aeeffed656d5ff8a6cd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 14 20:01:35 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jan 15 04:23:57 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0efa2b3

llvm-runtimes/compiler-rt-sanitizers: Add 19.1.7

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   2 +
 .../compiler-rt-sanitizers-19.1.7.ebuild           | 223 +++++++++++++++++++++
 2 files changed, 225 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 9bba244eb8c2..a2e751ac3e17 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -14,6 +14,8 @@ DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d22
 DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764
 DIST llvm-project-19.1.6.src.tar.xz 141248428 BLAKE2B b35ab0c754f28c850ac6fd4ee584e963b1d5cf06885c59827ee4ac11f93cde5b8e0268fbed560839137de2c495c9da2b889331cd12a8a02958d8e0cbdbed2607 SHA512 d411a6d913d6a1e1f3c16cfc1ce81c1e6292ea370703f55fb67c7af62f02193d53f5ef7823c8679d6f25cbe47b40236fcaf37044ad7cdfada8166efe7eb106b3
 DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9edee115385181781c8100f14ec80061d7888ee4c4c519297a0e89b9c7ab2203aa9d5bb3084ea1d0f0024c2acf84826fd370b SHA512 8e79a39a4f54da3579794f9b5a009ea8ee56c7bc1805187274794ce56e81aa492ea93f5c7839a59beedcf7d657acded5ecb75d5803658cce1f9e8f753439c6c4
+DIST llvm-project-19.1.7.src.tar.xz 141249332 BLAKE2B 1259ed7f9aca7b35e89d818befdee20fd8bed4d2dc2c2c6f6f56451fd43d35ac03a0a5a406e142d22b25137999dc5b17471c196f8fcf79f20a8296832d900f6d SHA512 c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8
+DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf6f30e75705123d067ea97175d91d7a5b6a75008df01d99ae7aa16aaa3b101f3f41e38d01f04158f95a261d617b3ede0254cd SHA512 195797b06ac80a742e0ccbc03a50dc06dd2e04377d783d5474e3e72c5a75203b60292b047929312a411d22b137a239943fba414a4d136a2be14cbff978eb6bda
 DIST llvm-project-2529a8df53af9bc6cecfd6c83404ffa5e89e3370.tar.gz 224493461 BLAKE2B 0d3c757a8f34a9bf6b2ac0ad394cc1f8125cfee534c8bd0c5875eba56fe0171892586ec05b6f1e859e5962f81c76c9a315f60bcda012df73a3bd66709b265038 SHA512 a49fa1da2fd398b279a90292704e30d8ff7163219bfd91c4a80fa5123d957cdef52d2ee41710a8bcbfea3d9a5eec269dfc756584fcc27a495f7f381176de4e69
 DIST llvm-project-8af4d206e0f979f68925a08f9dffd60a98ce97e2.tar.gz 224825146 BLAKE2B 36e9c8f9615d65fc72beb699c4ce5959676975267a4c4288a01009d26ab84ae411f2855e4e6475957b91ddc21da29251ab22e331395bc9fee0f9bc907a05384a SHA512 ec72cdd7cc6d9bef31ae9295606d18e4935468fe60ab632aced21261d437e76f11d83d0d7199a6028689990260d9155098f7d64e97db0e0af28ea6c75a773bcc
 DIST llvm-project-ccfe0de0e1e37ed369c9bf89dd0188ba0afb2e9a.tar.gz 224396427 BLAKE2B 6e13c65d2ba83fdaf2db20a58b878106568406f07f9c2ceb47e4d2572fb041211384ed67c43801764060101ec4a1b04c18bf4097f37512d2751aa5860c1a8dc3 SHA512 ef4512b735568aaa627a7f4e9bac3fc4722db7a2b8bd1610faaf066856be9474fb297fd75b3c0dcc76f60ab35c3110fd329faad3e8d9b75e93844d56f41c03d1

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.7.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.7.ebuild
new file mode 100644
index 000000000000..72d94672974d
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.7.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
+IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-01-18  8:21 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-01-18  8:21 UTC (permalink / raw
  To: gentoo-commits

commit:     3904511c86c7f56174bdf387c81c6786bebbd8f8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 18 07:21:36 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 18 07:21:36 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3904511c

llvm-runtimes/compiler-rt-sanitizers: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   2 -
 ...ompiler-rt-sanitizers-20.0.0_pre20241227.ebuild | 222 ---------------------
 ...ompiler-rt-sanitizers-20.0.0_pre20250104.ebuild | 222 ---------------------
 3 files changed, 446 deletions(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index a2e751ac3e17..89f322fead81 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -16,6 +16,4 @@ DIST llvm-project-19.1.6.src.tar.xz 141248428 BLAKE2B b35ab0c754f28c850ac6fd4ee5
 DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9edee115385181781c8100f14ec80061d7888ee4c4c519297a0e89b9c7ab2203aa9d5bb3084ea1d0f0024c2acf84826fd370b SHA512 8e79a39a4f54da3579794f9b5a009ea8ee56c7bc1805187274794ce56e81aa492ea93f5c7839a59beedcf7d657acded5ecb75d5803658cce1f9e8f753439c6c4
 DIST llvm-project-19.1.7.src.tar.xz 141249332 BLAKE2B 1259ed7f9aca7b35e89d818befdee20fd8bed4d2dc2c2c6f6f56451fd43d35ac03a0a5a406e142d22b25137999dc5b17471c196f8fcf79f20a8296832d900f6d SHA512 c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8
 DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf6f30e75705123d067ea97175d91d7a5b6a75008df01d99ae7aa16aaa3b101f3f41e38d01f04158f95a261d617b3ede0254cd SHA512 195797b06ac80a742e0ccbc03a50dc06dd2e04377d783d5474e3e72c5a75203b60292b047929312a411d22b137a239943fba414a4d136a2be14cbff978eb6bda
-DIST llvm-project-2529a8df53af9bc6cecfd6c83404ffa5e89e3370.tar.gz 224493461 BLAKE2B 0d3c757a8f34a9bf6b2ac0ad394cc1f8125cfee534c8bd0c5875eba56fe0171892586ec05b6f1e859e5962f81c76c9a315f60bcda012df73a3bd66709b265038 SHA512 a49fa1da2fd398b279a90292704e30d8ff7163219bfd91c4a80fa5123d957cdef52d2ee41710a8bcbfea3d9a5eec269dfc756584fcc27a495f7f381176de4e69
 DIST llvm-project-8af4d206e0f979f68925a08f9dffd60a98ce97e2.tar.gz 224825146 BLAKE2B 36e9c8f9615d65fc72beb699c4ce5959676975267a4c4288a01009d26ab84ae411f2855e4e6475957b91ddc21da29251ab22e331395bc9fee0f9bc907a05384a SHA512 ec72cdd7cc6d9bef31ae9295606d18e4935468fe60ab632aced21261d437e76f11d83d0d7199a6028689990260d9155098f7d64e97db0e0af28ea6c75a773bcc
-DIST llvm-project-ccfe0de0e1e37ed369c9bf89dd0188ba0afb2e9a.tar.gz 224396427 BLAKE2B 6e13c65d2ba83fdaf2db20a58b878106568406f07f9c2ceb47e4d2572fb041211384ed67c43801764060101ec4a1b04c18bf4097f37512d2751aa5860c1a8dc3 SHA512 ef4512b735568aaa627a7f4e9bac3fc4722db7a2b8bd1610faaf066856be9474fb297fd75b3c0dcc76f60ab35c3110fd329faad3e8d9b75e93844d56f41c03d1

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241227.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241227.ebuild
deleted file mode 100644
index cea1ae243486..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20241227.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250104.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250104.ebuild
deleted file mode 100644
index 5efa81abbe9b..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250104.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-01-18 15:09 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-01-18 15:09 UTC (permalink / raw
  To: gentoo-commits

commit:     c85397c6bbb1ee744de39edc01fbd20cc881aa08
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 18 15:00:46 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 18 15:03:00 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c85397c6

llvm-runtimes/compiler-rt-sanitizers: Add 20.0.0_pre20250118 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 +
 ...ompiler-rt-sanitizers-20.0.0_pre20250118.ebuild | 222 +++++++++++++++++++++
 2 files changed, 223 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 89f322fead81..cea7f2698228 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -17,3 +17,4 @@ DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9
 DIST llvm-project-19.1.7.src.tar.xz 141249332 BLAKE2B 1259ed7f9aca7b35e89d818befdee20fd8bed4d2dc2c2c6f6f56451fd43d35ac03a0a5a406e142d22b25137999dc5b17471c196f8fcf79f20a8296832d900f6d SHA512 c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8
 DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf6f30e75705123d067ea97175d91d7a5b6a75008df01d99ae7aa16aaa3b101f3f41e38d01f04158f95a261d617b3ede0254cd SHA512 195797b06ac80a742e0ccbc03a50dc06dd2e04377d783d5474e3e72c5a75203b60292b047929312a411d22b137a239943fba414a4d136a2be14cbff978eb6bda
 DIST llvm-project-8af4d206e0f979f68925a08f9dffd60a98ce97e2.tar.gz 224825146 BLAKE2B 36e9c8f9615d65fc72beb699c4ce5959676975267a4c4288a01009d26ab84ae411f2855e4e6475957b91ddc21da29251ab22e331395bc9fee0f9bc907a05384a SHA512 ec72cdd7cc6d9bef31ae9295606d18e4935468fe60ab632aced21261d437e76f11d83d0d7199a6028689990260d9155098f7d64e97db0e0af28ea6c75a773bcc
+DIST llvm-project-c3a935e3f967f8f22f5db240d145459ee621c1e0.tar.gz 225133913 BLAKE2B ced922010bad14df6bce0dbbb9323ee3cc9d7bf2f764f8c982d134d7a97e38d84b0b81635bbb16031aa1899c744e7c036cec5d1957733bbed7a2f18f89db0b6f SHA512 0ea083defb3c0ecaa5d8d28682f140c68ec6b3ab6cbfc60fc38a9265a8eb88b618c075d6ae03170ed54c5e7dcb3b7003eaacea2fcb115e9864b64a17cea0013d

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250118.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250118.ebuild
new file mode 100644
index 000000000000..5efa81abbe9b
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250118.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-01-22 19:15 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-01-22 19:15 UTC (permalink / raw
  To: gentoo-commits

commit:     b54236be0e3ff584eaf2a668ba3841ff654516f6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 16:33:37 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jan 22 19:15:28 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b54236be

llvm-runtimes/compiler-rt-sanitizers: Add 20.0.0_pre20250122 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 +
 ...ompiler-rt-sanitizers-20.0.0_pre20250122.ebuild | 222 +++++++++++++++++++++
 2 files changed, 223 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index cea7f2698228..c2252964ea90 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -17,4 +17,5 @@ DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9
 DIST llvm-project-19.1.7.src.tar.xz 141249332 BLAKE2B 1259ed7f9aca7b35e89d818befdee20fd8bed4d2dc2c2c6f6f56451fd43d35ac03a0a5a406e142d22b25137999dc5b17471c196f8fcf79f20a8296832d900f6d SHA512 c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8
 DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf6f30e75705123d067ea97175d91d7a5b6a75008df01d99ae7aa16aaa3b101f3f41e38d01f04158f95a261d617b3ede0254cd SHA512 195797b06ac80a742e0ccbc03a50dc06dd2e04377d783d5474e3e72c5a75203b60292b047929312a411d22b137a239943fba414a4d136a2be14cbff978eb6bda
 DIST llvm-project-8af4d206e0f979f68925a08f9dffd60a98ce97e2.tar.gz 224825146 BLAKE2B 36e9c8f9615d65fc72beb699c4ce5959676975267a4c4288a01009d26ab84ae411f2855e4e6475957b91ddc21da29251ab22e331395bc9fee0f9bc907a05384a SHA512 ec72cdd7cc6d9bef31ae9295606d18e4935468fe60ab632aced21261d437e76f11d83d0d7199a6028689990260d9155098f7d64e97db0e0af28ea6c75a773bcc
+DIST llvm-project-97c3a990f05606cb807faf53bc41302fb62c7980.tar.gz 226261635 BLAKE2B 9dd0bdfaa6ee984747f2d9d8b9606cd8d2e75fa64d45fd7c87227ddca7cffe888a1d932d73c123b25360690fd687554cc333fb3d871ab0e72ddd2b1158bae2e0 SHA512 466ae8aea014fd396f3fd6b77055238a672f012b79f25ed0b215e01f968a56dd4eeaf148d03246701b1ac4cbb8f02a4325142d6e5503fb6231e330c2e49e28e7
 DIST llvm-project-c3a935e3f967f8f22f5db240d145459ee621c1e0.tar.gz 225133913 BLAKE2B ced922010bad14df6bce0dbbb9323ee3cc9d7bf2f764f8c982d134d7a97e38d84b0b81635bbb16031aa1899c744e7c036cec5d1957733bbed7a2f18f89db0b6f SHA512 0ea083defb3c0ecaa5d8d28682f140c68ec6b3ab6cbfc60fc38a9265a8eb88b618c075d6ae03170ed54c5e7dcb3b7003eaacea2fcb115e9864b64a17cea0013d

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250122.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250122.ebuild
new file mode 100644
index 000000000000..5efa81abbe9b
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250122.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-01-25 13:33 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-01-25 13:33 UTC (permalink / raw
  To: gentoo-commits

commit:     52ba289753deca70ec2f0d093fd7db44805974d0
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 25 13:08:04 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 25 13:33:04 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52ba2897

llvm-runtimes/compiler-rt-sanitizers: Add 20.0.0_pre20250125 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 +
 ...ompiler-rt-sanitizers-20.0.0_pre20250125.ebuild | 222 +++++++++++++++++++++
 2 files changed, 223 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index c2252964ea90..6406e0878775 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -16,6 +16,7 @@ DIST llvm-project-19.1.6.src.tar.xz 141248428 BLAKE2B b35ab0c754f28c850ac6fd4ee5
 DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9edee115385181781c8100f14ec80061d7888ee4c4c519297a0e89b9c7ab2203aa9d5bb3084ea1d0f0024c2acf84826fd370b SHA512 8e79a39a4f54da3579794f9b5a009ea8ee56c7bc1805187274794ce56e81aa492ea93f5c7839a59beedcf7d657acded5ecb75d5803658cce1f9e8f753439c6c4
 DIST llvm-project-19.1.7.src.tar.xz 141249332 BLAKE2B 1259ed7f9aca7b35e89d818befdee20fd8bed4d2dc2c2c6f6f56451fd43d35ac03a0a5a406e142d22b25137999dc5b17471c196f8fcf79f20a8296832d900f6d SHA512 c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8
 DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf6f30e75705123d067ea97175d91d7a5b6a75008df01d99ae7aa16aaa3b101f3f41e38d01f04158f95a261d617b3ede0254cd SHA512 195797b06ac80a742e0ccbc03a50dc06dd2e04377d783d5474e3e72c5a75203b60292b047929312a411d22b137a239943fba414a4d136a2be14cbff978eb6bda
+DIST llvm-project-1f26ac10ca1bef40a80be8f81a6f109713bc586f.tar.gz 226424755 BLAKE2B 642befb8d6923f335d1d68129ebb7357f8ba22e110df494dd956c8097e4e5db4b2a88fcc069ab67184b03558f072c68e002bdaf90eba865e38b1473a0ef29eed SHA512 e9bb4fd31bbad5ec864c662515b5ec2e5511cce975040f9f3cd8f009c92f76077928feae0467fd9519a001a379c857f7539c506953d8d5a9209a9f358f414aac
 DIST llvm-project-8af4d206e0f979f68925a08f9dffd60a98ce97e2.tar.gz 224825146 BLAKE2B 36e9c8f9615d65fc72beb699c4ce5959676975267a4c4288a01009d26ab84ae411f2855e4e6475957b91ddc21da29251ab22e331395bc9fee0f9bc907a05384a SHA512 ec72cdd7cc6d9bef31ae9295606d18e4935468fe60ab632aced21261d437e76f11d83d0d7199a6028689990260d9155098f7d64e97db0e0af28ea6c75a773bcc
 DIST llvm-project-97c3a990f05606cb807faf53bc41302fb62c7980.tar.gz 226261635 BLAKE2B 9dd0bdfaa6ee984747f2d9d8b9606cd8d2e75fa64d45fd7c87227ddca7cffe888a1d932d73c123b25360690fd687554cc333fb3d871ab0e72ddd2b1158bae2e0 SHA512 466ae8aea014fd396f3fd6b77055238a672f012b79f25ed0b215e01f968a56dd4eeaf148d03246701b1ac4cbb8f02a4325142d6e5503fb6231e330c2e49e28e7
 DIST llvm-project-c3a935e3f967f8f22f5db240d145459ee621c1e0.tar.gz 225133913 BLAKE2B ced922010bad14df6bce0dbbb9323ee3cc9d7bf2f764f8c982d134d7a97e38d84b0b81635bbb16031aa1899c744e7c036cec5d1957733bbed7a2f18f89db0b6f SHA512 0ea083defb3c0ecaa5d8d28682f140c68ec6b3ab6cbfc60fc38a9265a8eb88b618c075d6ae03170ed54c5e7dcb3b7003eaacea2fcb115e9864b64a17cea0013d

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250125.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250125.ebuild
new file mode 100644
index 000000000000..5efa81abbe9b
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250125.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-01-31 21:51 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-01-31 21:51 UTC (permalink / raw
  To: gentoo-commits

commit:     836020a4fccf9bfbc0bf9a25d9d01507f50b9b92
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 31 19:51:31 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan 31 21:50:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=836020a4

llvm-runtimes/compiler-rt-sanitizers: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   5 -
 .../compiler-rt-sanitizers-19.1.6.ebuild           | 223 ---------------------
 ...ompiler-rt-sanitizers-20.0.0_pre20250111.ebuild | 222 --------------------
 ...ompiler-rt-sanitizers-20.0.0_pre20250118.ebuild | 222 --------------------
 ...ompiler-rt-sanitizers-20.0.0_pre20250122.ebuild | 222 --------------------
 5 files changed, 894 deletions(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 6406e0878775..6fc4f342b1f3 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -12,11 +12,6 @@ DIST llvm-project-18.1.8.src.tar.xz 132067260 BLAKE2B a950492f1dbfb874dff63b1ffe
 DIST llvm-project-18.1.8.src.tar.xz.sig 566 BLAKE2B 6ab0efc5b38d4483f4e32e8b85774b2edd5d88fdf29f23b88eb0b5130a7a7f0e80549612b025f927e92de4a08ff7c292cff224dbda91a5d598244e98f7ad0fbd SHA512 ddfd1e8a06756759af6cbe488c82a6d6a62ba91f3e8a0eb4cece561321824f5d165b08ed91010588790b76e19790931d2651b24dba8567e3b151d3cb43bec25b
 DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d2250268df36fb94fa0fd5b3611484094fbd7962051978334d2c623d2ff5a0209dbb2c6c6492be0146507ae982a7d3e9705a689c5 SHA512 a586f8a41dde5e0d9ca6d8c58e9ef2a2e59b70a86d2e2c46106dc31b5c096bb80af0cdbdb486179e9cc676a540099f49a1c2db9e5e84c50362db1f72e9af6906
 DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764
-DIST llvm-project-19.1.6.src.tar.xz 141248428 BLAKE2B b35ab0c754f28c850ac6fd4ee584e963b1d5cf06885c59827ee4ac11f93cde5b8e0268fbed560839137de2c495c9da2b889331cd12a8a02958d8e0cbdbed2607 SHA512 d411a6d913d6a1e1f3c16cfc1ce81c1e6292ea370703f55fb67c7af62f02193d53f5ef7823c8679d6f25cbe47b40236fcaf37044ad7cdfada8166efe7eb106b3
-DIST llvm-project-19.1.6.src.tar.xz.sig 438 BLAKE2B 1791e98252ab78a9a762ef601ff9edee115385181781c8100f14ec80061d7888ee4c4c519297a0e89b9c7ab2203aa9d5bb3084ea1d0f0024c2acf84826fd370b SHA512 8e79a39a4f54da3579794f9b5a009ea8ee56c7bc1805187274794ce56e81aa492ea93f5c7839a59beedcf7d657acded5ecb75d5803658cce1f9e8f753439c6c4
 DIST llvm-project-19.1.7.src.tar.xz 141249332 BLAKE2B 1259ed7f9aca7b35e89d818befdee20fd8bed4d2dc2c2c6f6f56451fd43d35ac03a0a5a406e142d22b25137999dc5b17471c196f8fcf79f20a8296832d900f6d SHA512 c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8
 DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf6f30e75705123d067ea97175d91d7a5b6a75008df01d99ae7aa16aaa3b101f3f41e38d01f04158f95a261d617b3ede0254cd SHA512 195797b06ac80a742e0ccbc03a50dc06dd2e04377d783d5474e3e72c5a75203b60292b047929312a411d22b137a239943fba414a4d136a2be14cbff978eb6bda
 DIST llvm-project-1f26ac10ca1bef40a80be8f81a6f109713bc586f.tar.gz 226424755 BLAKE2B 642befb8d6923f335d1d68129ebb7357f8ba22e110df494dd956c8097e4e5db4b2a88fcc069ab67184b03558f072c68e002bdaf90eba865e38b1473a0ef29eed SHA512 e9bb4fd31bbad5ec864c662515b5ec2e5511cce975040f9f3cd8f009c92f76077928feae0467fd9519a001a379c857f7539c506953d8d5a9209a9f358f414aac
-DIST llvm-project-8af4d206e0f979f68925a08f9dffd60a98ce97e2.tar.gz 224825146 BLAKE2B 36e9c8f9615d65fc72beb699c4ce5959676975267a4c4288a01009d26ab84ae411f2855e4e6475957b91ddc21da29251ab22e331395bc9fee0f9bc907a05384a SHA512 ec72cdd7cc6d9bef31ae9295606d18e4935468fe60ab632aced21261d437e76f11d83d0d7199a6028689990260d9155098f7d64e97db0e0af28ea6c75a773bcc
-DIST llvm-project-97c3a990f05606cb807faf53bc41302fb62c7980.tar.gz 226261635 BLAKE2B 9dd0bdfaa6ee984747f2d9d8b9606cd8d2e75fa64d45fd7c87227ddca7cffe888a1d932d73c123b25360690fd687554cc333fb3d871ab0e72ddd2b1158bae2e0 SHA512 466ae8aea014fd396f3fd6b77055238a672f012b79f25ed0b215e01f968a56dd4eeaf148d03246701b1ac4cbb8f02a4325142d6e5503fb6231e330c2e49e28e7
-DIST llvm-project-c3a935e3f967f8f22f5db240d145459ee621c1e0.tar.gz 225133913 BLAKE2B ced922010bad14df6bce0dbbb9323ee3cc9d7bf2f764f8c982d134d7a97e38d84b0b81635bbb16031aa1899c744e7c036cec5d1957733bbed7a2f18f89db0b6f SHA512 0ea083defb3c0ecaa5d8d28682f140c68ec6b3ab6cbfc60fc38a9265a8eb88b618c075d6ae03170ed54c5e7dcb3b7003eaacea2fcb115e9864b64a17cea0013d

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.6.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.6.ebuild
deleted file mode 100644
index d859114a0b3d..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.6.ebuild
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250111.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250111.ebuild
deleted file mode 100644
index 5efa81abbe9b..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250111.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250118.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250118.ebuild
deleted file mode 100644
index 5efa81abbe9b..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250118.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250122.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250122.ebuild
deleted file mode 100644
index 5efa81abbe9b..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250122.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-02-01  8:05 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-02-01  8:05 UTC (permalink / raw
  To: gentoo-commits

commit:     bf8f1631a01334d7460d183150d889b77fc607ab
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  1 07:59:19 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb  1 08:05:48 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf8f1631

llvm-runtimes/compiler-rt-sanitizers: main is now 21*

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 ...ers-20.0.0.9999.ebuild => compiler-rt-sanitizers-21.0.0.9999.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0.9999.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0.9999.ebuild
similarity index 99%
rename from llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0.9999.ebuild
rename to llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0.9999.ebuild
index cea1ae243486..5efa81abbe9b 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0.9999.ebuild
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0.9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-02-01 13:15 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-02-01 13:15 UTC (permalink / raw
  To: gentoo-commits

commit:     68585615e254734d3202c65fdd0230530b0d3b0a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  1 13:12:51 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb  1 13:14:49 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68585615

llvm-runtimes/compiler-rt-sanitizers: Add 21.0.0_pre20250201 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 +
 ...ompiler-rt-sanitizers-21.0.0_pre20250201.ebuild | 222 +++++++++++++++++++++
 2 files changed, 223 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 6fc4f342b1f3..aef825bc8b03 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -15,3 +15,4 @@ DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e2
 DIST llvm-project-19.1.7.src.tar.xz 141249332 BLAKE2B 1259ed7f9aca7b35e89d818befdee20fd8bed4d2dc2c2c6f6f56451fd43d35ac03a0a5a406e142d22b25137999dc5b17471c196f8fcf79f20a8296832d900f6d SHA512 c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8
 DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf6f30e75705123d067ea97175d91d7a5b6a75008df01d99ae7aa16aaa3b101f3f41e38d01f04158f95a261d617b3ede0254cd SHA512 195797b06ac80a742e0ccbc03a50dc06dd2e04377d783d5474e3e72c5a75203b60292b047929312a411d22b137a239943fba414a4d136a2be14cbff978eb6bda
 DIST llvm-project-1f26ac10ca1bef40a80be8f81a6f109713bc586f.tar.gz 226424755 BLAKE2B 642befb8d6923f335d1d68129ebb7357f8ba22e110df494dd956c8097e4e5db4b2a88fcc069ab67184b03558f072c68e002bdaf90eba865e38b1473a0ef29eed SHA512 e9bb4fd31bbad5ec864c662515b5ec2e5511cce975040f9f3cd8f009c92f76077928feae0467fd9519a001a379c857f7539c506953d8d5a9209a9f358f414aac
+DIST llvm-project-bfa7edcc6652bdb37d53e0cec64926aab3f280eb.tar.gz 226735989 BLAKE2B 165837dc526e618b44c49d5fa3dceda373452e010a09746bff248903fe77874637d05ab9f5d2f63de7ebce5c14e3b19a131313a4a557adfd20fe9cb93ab60476 SHA512 e9e19176fcf1302727ee34d69eaa820b94959d64ceaf754d8a93ebd5e262cec7fe35e87b08f705b09e42c3ea26b671318eecf10e9137c635b12f481f80fbac23

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250201.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250201.ebuild
new file mode 100644
index 000000000000..5efa81abbe9b
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250201.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-02-02 18:25 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-02-02 18:25 UTC (permalink / raw
  To: gentoo-commits

commit:     f23a80faf8fe6cfb90ffc1ee7681e49fb01719f8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  2 15:58:53 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Feb  2 18:25:09 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f23a80fa

llvm-runtimes/compiler-rt-sanitizers: Add 20.1.0_rc1

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   2 +
 .../compiler-rt-sanitizers-20.1.0_rc1.ebuild       | 222 +++++++++++++++++++++
 2 files changed, 224 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index aef825bc8b03..88d22e19c009 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -15,4 +15,6 @@ DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e2
 DIST llvm-project-19.1.7.src.tar.xz 141249332 BLAKE2B 1259ed7f9aca7b35e89d818befdee20fd8bed4d2dc2c2c6f6f56451fd43d35ac03a0a5a406e142d22b25137999dc5b17471c196f8fcf79f20a8296832d900f6d SHA512 c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8
 DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf6f30e75705123d067ea97175d91d7a5b6a75008df01d99ae7aa16aaa3b101f3f41e38d01f04158f95a261d617b3ede0254cd SHA512 195797b06ac80a742e0ccbc03a50dc06dd2e04377d783d5474e3e72c5a75203b60292b047929312a411d22b137a239943fba414a4d136a2be14cbff978eb6bda
 DIST llvm-project-1f26ac10ca1bef40a80be8f81a6f109713bc586f.tar.gz 226424755 BLAKE2B 642befb8d6923f335d1d68129ebb7357f8ba22e110df494dd956c8097e4e5db4b2a88fcc069ab67184b03558f072c68e002bdaf90eba865e38b1473a0ef29eed SHA512 e9bb4fd31bbad5ec864c662515b5ec2e5511cce975040f9f3cd8f009c92f76077928feae0467fd9519a001a379c857f7539c506953d8d5a9209a9f358f414aac
+DIST llvm-project-20.1.0-rc1.src.tar.xz 147144668 BLAKE2B ea4733962f38ea5897c73e91840818921739909c3671749bc8a0b1d2798e5a0815bbe750ade3a2a7414836ab7158754818b2f9370a4ee1bbbd52c96b1e95ef9b SHA512 c23c4b1227b6b0b7c3059358e64a00ee98893236bb1a0a41d7e821bdf2aa8353aea8f9f7b9498899c6807b9b8e2ceb06c3cd62e32fd07a786a319135055541b4
+DIST llvm-project-20.1.0-rc1.src.tar.xz.sig 566 BLAKE2B 32eb278ec4ff1bb9d258b584922b0d227f4126a957ba75af44dcaa63b6a12ef73db56d6a86f24244af47803ddf6a243149d784f08137cbea60b49700be537705 SHA512 d7a334326201f8ca78284b33c325f180538667a0401bc30931e790aacc96dd78f6559c45929b6c335d40ef1dbe772738c0ce55d881ae3d7401733778b485408c
 DIST llvm-project-bfa7edcc6652bdb37d53e0cec64926aab3f280eb.tar.gz 226735989 BLAKE2B 165837dc526e618b44c49d5fa3dceda373452e010a09746bff248903fe77874637d05ab9f5d2f63de7ebce5c14e3b19a131313a4a557adfd20fe9cb93ab60476 SHA512 e9e19176fcf1302727ee34d69eaa820b94959d64ceaf754d8a93ebd5e262cec7fe35e87b08f705b09e42c3ea26b671318eecf10e9137c635b12f481f80fbac23

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.1.0_rc1.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.1.0_rc1.ebuild
new file mode 100644
index 000000000000..5efa81abbe9b
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.1.0_rc1.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-02-07 20:08 Arthur Zamarin
  0 siblings, 0 replies; 27+ messages in thread
From: Arthur Zamarin @ 2025-02-07 20:08 UTC (permalink / raw
  To: gentoo-commits

commit:     49232c2c790c1913abdd927481479734380ddd33
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  7 20:07:47 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Feb  7 20:07:47 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49232c2c

llvm-runtimes/compiler-rt-sanitizers: Stabilize 19.1.7 arm64, #946879

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 .../compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.7.ebuild         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.7.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.7.ebuild
index f530ced0a62c..ff8c736f7dff 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.7.ebuild
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.7.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/"
 
 LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
 SLOT="${LLVM_MAJOR}"
-KEYWORDS="amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
+KEYWORDS="amd64 ~arm arm64 ~loong ~mips ~ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos"
 IUSE="+abi_x86_32 abi_x86_64 +clang debug test"
 # base targets
 IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-02-08 11:51 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-02-08 11:51 UTC (permalink / raw
  To: gentoo-commits

commit:     49affda7a7c1ea9de10da5748137d0edcb60b623
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  8 11:48:57 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb  8 11:48:57 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49affda7

llvm-runtimes/compiler-rt-sanitizers: Add 21.0.0_pre20250208 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 +
 ...ompiler-rt-sanitizers-21.0.0_pre20250208.ebuild | 222 +++++++++++++++++++++
 2 files changed, 223 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 88d22e19c009..9767c1faca49 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -17,4 +17,5 @@ DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf
 DIST llvm-project-1f26ac10ca1bef40a80be8f81a6f109713bc586f.tar.gz 226424755 BLAKE2B 642befb8d6923f335d1d68129ebb7357f8ba22e110df494dd956c8097e4e5db4b2a88fcc069ab67184b03558f072c68e002bdaf90eba865e38b1473a0ef29eed SHA512 e9bb4fd31bbad5ec864c662515b5ec2e5511cce975040f9f3cd8f009c92f76077928feae0467fd9519a001a379c857f7539c506953d8d5a9209a9f358f414aac
 DIST llvm-project-20.1.0-rc1.src.tar.xz 147144668 BLAKE2B ea4733962f38ea5897c73e91840818921739909c3671749bc8a0b1d2798e5a0815bbe750ade3a2a7414836ab7158754818b2f9370a4ee1bbbd52c96b1e95ef9b SHA512 c23c4b1227b6b0b7c3059358e64a00ee98893236bb1a0a41d7e821bdf2aa8353aea8f9f7b9498899c6807b9b8e2ceb06c3cd62e32fd07a786a319135055541b4
 DIST llvm-project-20.1.0-rc1.src.tar.xz.sig 566 BLAKE2B 32eb278ec4ff1bb9d258b584922b0d227f4126a957ba75af44dcaa63b6a12ef73db56d6a86f24244af47803ddf6a243149d784f08137cbea60b49700be537705 SHA512 d7a334326201f8ca78284b33c325f180538667a0401bc30931e790aacc96dd78f6559c45929b6c335d40ef1dbe772738c0ce55d881ae3d7401733778b485408c
+DIST llvm-project-6f241e36831927e3aea113cfc017c34fdeda340a.tar.gz 227203285 BLAKE2B 8d5e424c1836acc82ea766cd2cef104593c44d197ebeb64f18dbe74b1b5baeb4bc84084f5b68bd87ac36f7df25689dd2522cb6674a97da4f96f4f10f7bae5b06 SHA512 2b6e4bd6445eabfa3ace9b45d20797c7afc23f4553a8938399aeba227e3b8ca6a53a7d7762925a845bfed031c37af692b9c08180fbab80db2f3166940e560077
 DIST llvm-project-bfa7edcc6652bdb37d53e0cec64926aab3f280eb.tar.gz 226735989 BLAKE2B 165837dc526e618b44c49d5fa3dceda373452e010a09746bff248903fe77874637d05ab9f5d2f63de7ebce5c14e3b19a131313a4a557adfd20fe9cb93ab60476 SHA512 e9e19176fcf1302727ee34d69eaa820b94959d64ceaf754d8a93ebd5e262cec7fe35e87b08f705b09e42c3ea26b671318eecf10e9137c635b12f481f80fbac23

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250208.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250208.ebuild
new file mode 100644
index 000000000000..5efa81abbe9b
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250208.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-02-11 11:29 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-02-11 11:29 UTC (permalink / raw
  To: gentoo-commits

commit:     134a4a2d0739b360f4fbf0a4367b332db5c3d07b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 11 10:56:53 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Feb 11 11:29:41 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=134a4a2d

llvm-runtimes/compiler-rt-sanitizers: Add 21.0.0_pre20250211 snapshot

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   1 +
 ...ompiler-rt-sanitizers-21.0.0_pre20250211.ebuild | 222 +++++++++++++++++++++
 2 files changed, 223 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 9767c1faca49..a0d4fd2db870 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -17,5 +17,6 @@ DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf
 DIST llvm-project-1f26ac10ca1bef40a80be8f81a6f109713bc586f.tar.gz 226424755 BLAKE2B 642befb8d6923f335d1d68129ebb7357f8ba22e110df494dd956c8097e4e5db4b2a88fcc069ab67184b03558f072c68e002bdaf90eba865e38b1473a0ef29eed SHA512 e9bb4fd31bbad5ec864c662515b5ec2e5511cce975040f9f3cd8f009c92f76077928feae0467fd9519a001a379c857f7539c506953d8d5a9209a9f358f414aac
 DIST llvm-project-20.1.0-rc1.src.tar.xz 147144668 BLAKE2B ea4733962f38ea5897c73e91840818921739909c3671749bc8a0b1d2798e5a0815bbe750ade3a2a7414836ab7158754818b2f9370a4ee1bbbd52c96b1e95ef9b SHA512 c23c4b1227b6b0b7c3059358e64a00ee98893236bb1a0a41d7e821bdf2aa8353aea8f9f7b9498899c6807b9b8e2ceb06c3cd62e32fd07a786a319135055541b4
 DIST llvm-project-20.1.0-rc1.src.tar.xz.sig 566 BLAKE2B 32eb278ec4ff1bb9d258b584922b0d227f4126a957ba75af44dcaa63b6a12ef73db56d6a86f24244af47803ddf6a243149d784f08137cbea60b49700be537705 SHA512 d7a334326201f8ca78284b33c325f180538667a0401bc30931e790aacc96dd78f6559c45929b6c335d40ef1dbe772738c0ce55d881ae3d7401733778b485408c
+DIST llvm-project-2cd8207b26ea4269630feba661f68554d7ae3c15.tar.gz 227261597 BLAKE2B 51ce992b651fcf08b7fd520420040803b59f1260947953325400c50bec576c418b162d8ae2d2307e70b885b1185c302a97409bcfe48cdb14b8e1384f4e2dfa9e SHA512 a41749943508ea4a18b47c4e947917b5268544e64372c0c3347f9ab8172a2c229d8b1d813d1e842be1b98aedd624524857ed3bb23fe98ad5f36e7a71581abb4b
 DIST llvm-project-6f241e36831927e3aea113cfc017c34fdeda340a.tar.gz 227203285 BLAKE2B 8d5e424c1836acc82ea766cd2cef104593c44d197ebeb64f18dbe74b1b5baeb4bc84084f5b68bd87ac36f7df25689dd2522cb6674a97da4f96f4f10f7bae5b06 SHA512 2b6e4bd6445eabfa3ace9b45d20797c7afc23f4553a8938399aeba227e3b8ca6a53a7d7762925a845bfed031c37af692b9c08180fbab80db2f3166940e560077
 DIST llvm-project-bfa7edcc6652bdb37d53e0cec64926aab3f280eb.tar.gz 226735989 BLAKE2B 165837dc526e618b44c49d5fa3dceda373452e010a09746bff248903fe77874637d05ab9f5d2f63de7ebce5c14e3b19a131313a4a557adfd20fe9cb93ab60476 SHA512 e9e19176fcf1302727ee34d69eaa820b94959d64ceaf754d8a93ebd5e262cec7fe35e87b08f705b09e42c3ea26b671318eecf10e9137c635b12f481f80fbac23

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250211.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250211.ebuild
new file mode 100644
index 000000000000..5efa81abbe9b
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250211.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-02-13  7:53 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-02-13  7:53 UTC (permalink / raw
  To: gentoo-commits

commit:     88bdab3544d15143032b7c5bb85d1a588656f41d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 13 07:48:05 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Feb 13 07:53:00 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88bdab35

llvm-runtimes/compiler-rt-sanitizers: Add 20.1.0_rc2

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   2 +
 .../compiler-rt-sanitizers-20.1.0_rc2.ebuild       | 222 +++++++++++++++++++++
 2 files changed, 224 insertions(+)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index a0d4fd2db870..98bd1e21ba7c 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -17,6 +17,8 @@ DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf
 DIST llvm-project-1f26ac10ca1bef40a80be8f81a6f109713bc586f.tar.gz 226424755 BLAKE2B 642befb8d6923f335d1d68129ebb7357f8ba22e110df494dd956c8097e4e5db4b2a88fcc069ab67184b03558f072c68e002bdaf90eba865e38b1473a0ef29eed SHA512 e9bb4fd31bbad5ec864c662515b5ec2e5511cce975040f9f3cd8f009c92f76077928feae0467fd9519a001a379c857f7539c506953d8d5a9209a9f358f414aac
 DIST llvm-project-20.1.0-rc1.src.tar.xz 147144668 BLAKE2B ea4733962f38ea5897c73e91840818921739909c3671749bc8a0b1d2798e5a0815bbe750ade3a2a7414836ab7158754818b2f9370a4ee1bbbd52c96b1e95ef9b SHA512 c23c4b1227b6b0b7c3059358e64a00ee98893236bb1a0a41d7e821bdf2aa8353aea8f9f7b9498899c6807b9b8e2ceb06c3cd62e32fd07a786a319135055541b4
 DIST llvm-project-20.1.0-rc1.src.tar.xz.sig 566 BLAKE2B 32eb278ec4ff1bb9d258b584922b0d227f4126a957ba75af44dcaa63b6a12ef73db56d6a86f24244af47803ddf6a243149d784f08137cbea60b49700be537705 SHA512 d7a334326201f8ca78284b33c325f180538667a0401bc30931e790aacc96dd78f6559c45929b6c335d40ef1dbe772738c0ce55d881ae3d7401733778b485408c
+DIST llvm-project-20.1.0-rc2.src.tar.xz 147160684 BLAKE2B 6adc1226f022272d78fb0ed361c190d369a2afc53bf868409fe8f4e092d5ffb9894c71870f072bb68162610782f48088468b4a49cdb1bc731d6689c791a5b5e3 SHA512 f303deaec8f25e1b122a7e85df192b6ea10c51472b78a3d14ad9d0b976a533cfbb9164aff0bc99e447e30938cf43363552c5493b4693e1f23291ea7a9b824bbb
+DIST llvm-project-20.1.0-rc2.src.tar.xz.sig 566 BLAKE2B aa91f7be228e51b0f2234bb5e0df173e3ddc90b6db4350a9008c2f8ba53220da6eef0c69778aecac3caecf918a0c54a0d910177ffe7643ad7fc5624a97262b7f SHA512 e5563a8a79b5e9ef26d62dc6d4385c1c86d12a652b4b1e7fc9ce45a2ea66e5118112746a61b439823bf99d65aea82285eabf5e07714eec77e6e5cd02feab82ce
 DIST llvm-project-2cd8207b26ea4269630feba661f68554d7ae3c15.tar.gz 227261597 BLAKE2B 51ce992b651fcf08b7fd520420040803b59f1260947953325400c50bec576c418b162d8ae2d2307e70b885b1185c302a97409bcfe48cdb14b8e1384f4e2dfa9e SHA512 a41749943508ea4a18b47c4e947917b5268544e64372c0c3347f9ab8172a2c229d8b1d813d1e842be1b98aedd624524857ed3bb23fe98ad5f36e7a71581abb4b
 DIST llvm-project-6f241e36831927e3aea113cfc017c34fdeda340a.tar.gz 227203285 BLAKE2B 8d5e424c1836acc82ea766cd2cef104593c44d197ebeb64f18dbe74b1b5baeb4bc84084f5b68bd87ac36f7df25689dd2522cb6674a97da4f96f4f10f7bae5b06 SHA512 2b6e4bd6445eabfa3ace9b45d20797c7afc23f4553a8938399aeba227e3b8ca6a53a7d7762925a845bfed031c37af692b9c08180fbab80db2f3166940e560077
 DIST llvm-project-bfa7edcc6652bdb37d53e0cec64926aab3f280eb.tar.gz 226735989 BLAKE2B 165837dc526e618b44c49d5fa3dceda373452e010a09746bff248903fe77874637d05ab9f5d2f63de7ebce5c14e3b19a131313a4a557adfd20fe9cb93ab60476 SHA512 e9e19176fcf1302727ee34d69eaa820b94959d64ceaf754d8a93ebd5e262cec7fe35e87b08f705b09e42c3ea26b671318eecf10e9137c635b12f481f80fbac23

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.1.0_rc2.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.1.0_rc2.ebuild
new file mode 100644
index 000000000000..5efa81abbe9b
--- /dev/null
+++ b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.1.0_rc2.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="${LLVM_MAJOR}"
+IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
+# base targets
+IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
+# sanitizer targets, keep in sync with config-ix.cmake
+# NB: ubsan, scudo deliberately match two entries
+SANITIZER_FLAGS=(
+	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
+	shadowcallstack gwp-asan nsan rtsan
+)
+IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
+REQUIRED_USE="
+	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
+	test? (
+		cfi? ( ubsan )
+		gwp-asan? ( scudo )
+	)
+"
+RESTRICT="
+	!clang? ( test )
+	!test? ( test )
+"
+
+DEPEND="
+	llvm-core/llvm:${LLVM_MAJOR}
+	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
+"
+BDEPEND="
+	clang? (
+		llvm-core/clang:${LLVM_MAJOR}
+		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
+	)
+	elibc_glibc? ( net-libs/libtirpc )
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
+		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
+	)
+	!test? (
+		${PYTHON_DEPS}
+	)
+"
+
+LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
+LLVM_TEST_COMPONENTS=(
+	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
+)
+llvm.org_set_globals
+
+python_check_deps() {
+	use test || return 0
+	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
+}
+
+check_space() {
+	if use test; then
+		local CHECKREQS_DISK_BUILD=11G
+		check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	check_space
+}
+
+pkg_setup() {
+	check_space
+	python-any-r1_pkg_setup
+}
+
+src_prepare() {
+	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
+
+	local flag
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if ! use "${flag}"; then
+			local cmake_flag=${flag/-/_}
+			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
+				cmake/config-ix.cmake || die
+		fi
+	done
+
+	# TODO: fix these tests to be skipped upstream
+	if use asan && ! use profile; then
+		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
+	fi
+	if use ubsan && ! use cfi; then
+		> test/cfi/CMakeLists.txt || die
+	fi
+	# hangs, sigh
+	rm test/tsan/getline_nohang.cpp || die
+
+	llvm.org_src_prepare
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	# pre-set since we need to pass it to cmake
+	BUILD_DIR=${WORKDIR}/compiler-rt_build
+
+	if use clang; then
+		local -x CC=${CHOST}-clang
+		local -x CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	local flag want_sanitizer=OFF
+	for flag in "${SANITIZER_FLAGS[@]}"; do
+		if use "${flag}"; then
+			want_sanitizer=ON
+			break
+		fi
+	done
+
+	local mycmakeargs=(
+		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
+		# use a build dir structure consistent with install
+		# this makes it possible to easily deploy test-friendly clang
+		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
+
+		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+		# builtins & crt installed by llvm-runtimes/compiler-rt
+		-DCOMPILER_RT_BUILD_BUILTINS=OFF
+		-DCOMPILER_RT_BUILD_CRT=OFF
+		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
+		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
+		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
+		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
+		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
+		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
+		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
+
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	if use amd64; then
+		mycmakeargs+=(
+			-DCAN_TARGET_i386=$(usex abi_x86_32)
+			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
+		)
+	fi
+
+	if use test; then
+		mycmakeargs+=(
+			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+			-DLLVM_LIT_ARGS="$(get_lit_flags)"
+
+			# they are created during src_test()
+			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
+			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
+		)
+
+		# same flags are passed for build & tests, so we need to strip
+		# them down to a subset supported by clang
+		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
+		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
+		strip-unsupported-flags
+	fi
+
+	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+		mycmakeargs+=(
+			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
+			# this allows adding arm64 support using SDK in EPREFIX
+			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
+			# Set version based on the SDK in EPREFIX
+			# This disables i386 for SDK >= 10.15
+			# Will error if has_use tsan and SDK < 10.12
+			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
+			# Use our libtool instead of looking it up with xcrun
+			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
+		)
+	fi
+
+	cmake_src_configure
+
+	if use test; then
+		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
+		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+		# copy clang over since resource_dir is located relatively to binary
+		# therefore, we can put our new libraries in it
+		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
+		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
+			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
+		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
+			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
+		cp "${sys_dir}"/*builtins*.a \
+			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
+		# we also need LLVMgold.so for gold-based tests
+		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
+			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
+				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
+		fi
+	fi
+}
+
+src_test() {
+	# respect TMPDIR!
+	local -x LIT_PRESERVES_TMP=1
+	# disable sandbox to have it stop clobbering LD_PRELOAD
+	local -x SANDBOX_ON=0
+	# wipe LD_PRELOAD to make ASAN happy
+	local -x LD_PRELOAD=
+
+	cmake_build check-all
+}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/
@ 2025-02-15  7:19 Michał Górny
  0 siblings, 0 replies; 27+ messages in thread
From: Michał Górny @ 2025-02-15  7:19 UTC (permalink / raw
  To: gentoo-commits

commit:     e0b8c2007bbb4b03b5c46e066b916cc21dfd9b05
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 15 07:17:55 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb 15 07:17:55 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0b8c200

llvm-runtimes/compiler-rt-sanitizers: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-runtimes/compiler-rt-sanitizers/Manifest      |   5 -
 ...ompiler-rt-sanitizers-20.0.0_pre20250125.ebuild | 222 ---------------------
 .../compiler-rt-sanitizers-20.1.0_rc1.ebuild       | 222 ---------------------
 ...ompiler-rt-sanitizers-21.0.0_pre20250201.ebuild | 222 ---------------------
 ...ompiler-rt-sanitizers-21.0.0_pre20250208.ebuild | 222 ---------------------
 5 files changed, 893 deletions(-)

diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 98bd1e21ba7c..fbc9e111ec89 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -14,11 +14,6 @@ DIST llvm-project-19.1.4.src.tar.xz 141255156 BLAKE2B b99cd8a96e38dbcfb582ee5d22
 DIST llvm-project-19.1.4.src.tar.xz.sig 438 BLAKE2B b0925bdb761046d69779e0b035e29430bc09ef2b81be763aa5c853793631d7b7fdd65eb4dae7a1e3b4daa15d189c24cd1e14f065f79fdbf75429fa34be9b330e SHA512 3fb4a6c7594cb43680860698dac47062dde30de60f515dcecdad63812ea1edfb2cb209d0a7ac2254589c245a95b7c0f571b582e0d4b97a6ae8242563483ea764
 DIST llvm-project-19.1.7.src.tar.xz 141249332 BLAKE2B 1259ed7f9aca7b35e89d818befdee20fd8bed4d2dc2c2c6f6f56451fd43d35ac03a0a5a406e142d22b25137999dc5b17471c196f8fcf79f20a8296832d900f6d SHA512 c7d63286d662707a9cd54758c9e3aaf52794a91900c484c4a6efa62d90bc719d5e7a345e4192feeb0c9fd11c82570d64677c781e5be1d645556b6aa018e47ec8
 DIST llvm-project-19.1.7.src.tar.xz.sig 438 BLAKE2B 4015140f4ba77de45039bdbdfbaf6f30e75705123d067ea97175d91d7a5b6a75008df01d99ae7aa16aaa3b101f3f41e38d01f04158f95a261d617b3ede0254cd SHA512 195797b06ac80a742e0ccbc03a50dc06dd2e04377d783d5474e3e72c5a75203b60292b047929312a411d22b137a239943fba414a4d136a2be14cbff978eb6bda
-DIST llvm-project-1f26ac10ca1bef40a80be8f81a6f109713bc586f.tar.gz 226424755 BLAKE2B 642befb8d6923f335d1d68129ebb7357f8ba22e110df494dd956c8097e4e5db4b2a88fcc069ab67184b03558f072c68e002bdaf90eba865e38b1473a0ef29eed SHA512 e9bb4fd31bbad5ec864c662515b5ec2e5511cce975040f9f3cd8f009c92f76077928feae0467fd9519a001a379c857f7539c506953d8d5a9209a9f358f414aac
-DIST llvm-project-20.1.0-rc1.src.tar.xz 147144668 BLAKE2B ea4733962f38ea5897c73e91840818921739909c3671749bc8a0b1d2798e5a0815bbe750ade3a2a7414836ab7158754818b2f9370a4ee1bbbd52c96b1e95ef9b SHA512 c23c4b1227b6b0b7c3059358e64a00ee98893236bb1a0a41d7e821bdf2aa8353aea8f9f7b9498899c6807b9b8e2ceb06c3cd62e32fd07a786a319135055541b4
-DIST llvm-project-20.1.0-rc1.src.tar.xz.sig 566 BLAKE2B 32eb278ec4ff1bb9d258b584922b0d227f4126a957ba75af44dcaa63b6a12ef73db56d6a86f24244af47803ddf6a243149d784f08137cbea60b49700be537705 SHA512 d7a334326201f8ca78284b33c325f180538667a0401bc30931e790aacc96dd78f6559c45929b6c335d40ef1dbe772738c0ce55d881ae3d7401733778b485408c
 DIST llvm-project-20.1.0-rc2.src.tar.xz 147160684 BLAKE2B 6adc1226f022272d78fb0ed361c190d369a2afc53bf868409fe8f4e092d5ffb9894c71870f072bb68162610782f48088468b4a49cdb1bc731d6689c791a5b5e3 SHA512 f303deaec8f25e1b122a7e85df192b6ea10c51472b78a3d14ad9d0b976a533cfbb9164aff0bc99e447e30938cf43363552c5493b4693e1f23291ea7a9b824bbb
 DIST llvm-project-20.1.0-rc2.src.tar.xz.sig 566 BLAKE2B aa91f7be228e51b0f2234bb5e0df173e3ddc90b6db4350a9008c2f8ba53220da6eef0c69778aecac3caecf918a0c54a0d910177ffe7643ad7fc5624a97262b7f SHA512 e5563a8a79b5e9ef26d62dc6d4385c1c86d12a652b4b1e7fc9ce45a2ea66e5118112746a61b439823bf99d65aea82285eabf5e07714eec77e6e5cd02feab82ce
 DIST llvm-project-2cd8207b26ea4269630feba661f68554d7ae3c15.tar.gz 227261597 BLAKE2B 51ce992b651fcf08b7fd520420040803b59f1260947953325400c50bec576c418b162d8ae2d2307e70b885b1185c302a97409bcfe48cdb14b8e1384f4e2dfa9e SHA512 a41749943508ea4a18b47c4e947917b5268544e64372c0c3347f9ab8172a2c229d8b1d813d1e842be1b98aedd624524857ed3bb23fe98ad5f36e7a71581abb4b
-DIST llvm-project-6f241e36831927e3aea113cfc017c34fdeda340a.tar.gz 227203285 BLAKE2B 8d5e424c1836acc82ea766cd2cef104593c44d197ebeb64f18dbe74b1b5baeb4bc84084f5b68bd87ac36f7df25689dd2522cb6674a97da4f96f4f10f7bae5b06 SHA512 2b6e4bd6445eabfa3ace9b45d20797c7afc23f4553a8938399aeba227e3b8ca6a53a7d7762925a845bfed031c37af692b9c08180fbab80db2f3166940e560077
-DIST llvm-project-bfa7edcc6652bdb37d53e0cec64926aab3f280eb.tar.gz 226735989 BLAKE2B 165837dc526e618b44c49d5fa3dceda373452e010a09746bff248903fe77874637d05ab9f5d2f63de7ebce5c14e3b19a131313a4a557adfd20fe9cb93ab60476 SHA512 e9e19176fcf1302727ee34d69eaa820b94959d64ceaf754d8a93ebd5e262cec7fe35e87b08f705b09e42c3ea26b671318eecf10e9137c635b12f481f80fbac23

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250125.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250125.ebuild
deleted file mode 100644
index 5efa81abbe9b..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.0.0_pre20250125.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.1.0_rc1.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.1.0_rc1.ebuild
deleted file mode 100644
index 5efa81abbe9b..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.1.0_rc1.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250201.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250201.ebuild
deleted file mode 100644
index 5efa81abbe9b..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250201.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}

diff --git a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250208.ebuild b/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250208.ebuild
deleted file mode 100644
index 5efa81abbe9b..000000000000
--- a/llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-21.0.0_pre20250208.ebuild
+++ /dev/null
@@ -1,222 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-inherit check-reqs cmake flag-o-matic llvm.org llvm-utils python-any-r1
-
-DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
-HOMEPAGE="https://llvm.org/"
-
-LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
-SLOT="${LLVM_MAJOR}"
-IUSE="+abi_x86_32 abi_x86_64 +clang +debug test"
-# base targets
-IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray"
-# sanitizer targets, keep in sync with config-ix.cmake
-# NB: ubsan, scudo deliberately match two entries
-SANITIZER_FLAGS=(
-	asan dfsan lsan msan hwasan tsan ubsan safestack cfi scudo
-	shadowcallstack gwp-asan nsan rtsan
-)
-IUSE+=" ${SANITIZER_FLAGS[@]/#/+}"
-REQUIRED_USE="
-	|| ( ${SANITIZER_FLAGS[*]} libfuzzer orc profile xray )
-	test? (
-		cfi? ( ubsan )
-		gwp-asan? ( scudo )
-	)
-"
-RESTRICT="
-	!clang? ( test )
-	!test? ( test )
-"
-
-DEPEND="
-	llvm-core/llvm:${LLVM_MAJOR}
-	virtual/libcrypt[abi_x86_32(-)?,abi_x86_64(-)?]
-"
-BDEPEND="
-	clang? (
-		llvm-core/clang:${LLVM_MAJOR}
-		llvm-runtimes/compiler-rt:${LLVM_MAJOR}
-	)
-	elibc_glibc? ( net-libs/libtirpc )
-	test? (
-		$(python_gen_any_dep ">=dev-python/lit-15[\${PYTHON_USEDEP}]")
-		=llvm-core/clang-${LLVM_VERSION}*:${LLVM_MAJOR}
-	)
-	!test? (
-		${PYTHON_DEPS}
-	)
-"
-
-LLVM_COMPONENTS=( compiler-rt cmake llvm/cmake )
-LLVM_TEST_COMPONENTS=(
-	llvm/include/llvm/ProfileData llvm/lib/Testing/Support third-party
-)
-llvm.org_set_globals
-
-python_check_deps() {
-	use test || return 0
-	python_has_version ">=dev-python/lit-15[${PYTHON_USEDEP}]"
-}
-
-check_space() {
-	if use test; then
-		local CHECKREQS_DISK_BUILD=11G
-		check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	check_space
-}
-
-pkg_setup() {
-	check_space
-	python-any-r1_pkg_setup
-}
-
-src_prepare() {
-	sed -i -e 's:-Werror::' lib/tsan/go/buildgo.sh || die
-
-	local flag
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if ! use "${flag}"; then
-			local cmake_flag=${flag/-/_}
-			sed -i -e "/COMPILER_RT_HAS_${cmake_flag^^}/s:TRUE:FALSE:" \
-				cmake/config-ix.cmake || die
-		fi
-	done
-
-	# TODO: fix these tests to be skipped upstream
-	if use asan && ! use profile; then
-		rm test/asan/TestCases/asan_and_llvm_coverage_test.cpp || die
-	fi
-	if use ubsan && ! use cfi; then
-		> test/cfi/CMakeLists.txt || die
-	fi
-	# hangs, sigh
-	rm test/tsan/getline_nohang.cpp || die
-
-	llvm.org_src_prepare
-}
-
-src_configure() {
-	llvm_prepend_path "${LLVM_MAJOR}"
-
-	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
-	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
-
-	# pre-set since we need to pass it to cmake
-	BUILD_DIR=${WORKDIR}/compiler-rt_build
-
-	if use clang; then
-		local -x CC=${CHOST}-clang
-		local -x CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	local flag want_sanitizer=OFF
-	for flag in "${SANITIZER_FLAGS[@]}"; do
-		if use "${flag}"; then
-			want_sanitizer=ON
-			break
-		fi
-	done
-
-	local mycmakeargs=(
-		-DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${LLVM_MAJOR}"
-		# use a build dir structure consistent with install
-		# this makes it possible to easily deploy test-friendly clang
-		-DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${LLVM_MAJOR}"
-
-		-DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
-		# builtins & crt installed by llvm-runtimes/compiler-rt
-		-DCOMPILER_RT_BUILD_BUILTINS=OFF
-		-DCOMPILER_RT_BUILD_CRT=OFF
-		-DCOMPILER_RT_BUILD_CTX_PROFILE=$(usex ctx-profile)
-		-DCOMPILER_RT_BUILD_LIBFUZZER=$(usex libfuzzer)
-		-DCOMPILER_RT_BUILD_MEMPROF=$(usex memprof)
-		-DCOMPILER_RT_BUILD_ORC=$(usex orc)
-		-DCOMPILER_RT_BUILD_PROFILE=$(usex profile)
-		-DCOMPILER_RT_BUILD_SANITIZERS="${want_sanitizer}"
-		-DCOMPILER_RT_BUILD_XRAY=$(usex xray)
-
-		-DPython3_EXECUTABLE="${PYTHON}"
-	)
-
-	if use amd64; then
-		mycmakeargs+=(
-			-DCAN_TARGET_i386=$(usex abi_x86_32)
-			-DCAN_TARGET_x86_64=$(usex abi_x86_64)
-		)
-	fi
-
-	if use test; then
-		mycmakeargs+=(
-			-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-			-DLLVM_LIT_ARGS="$(get_lit_flags)"
-
-			# they are created during src_test()
-			-DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang"
-			-DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_MAJOR}/bin/clang++"
-		)
-
-		# same flags are passed for build & tests, so we need to strip
-		# them down to a subset supported by clang
-		CC=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang \
-		CXX=${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin/clang++ \
-		strip-unsupported-flags
-	fi
-
-	if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
-		mycmakeargs+=(
-			# setting -isysroot is disabled with compiler-rt-prefix-paths.patch
-			# this allows adding arm64 support using SDK in EPREFIX
-			-DDARWIN_macosx_CACHED_SYSROOT="${EPREFIX}/MacOSX.sdk"
-			# Set version based on the SDK in EPREFIX
-			# This disables i386 for SDK >= 10.15
-			# Will error if has_use tsan and SDK < 10.12
-			-DDARWIN_macosx_OVERRIDE_SDK_VERSION="$(realpath ${EPREFIX}/MacOSX.sdk | sed -e 's/.*MacOSX\(.*\)\.sdk/\1/')"
-			# Use our libtool instead of looking it up with xcrun
-			-DCMAKE_LIBTOOL="${EPREFIX}/usr/bin/${CHOST}-libtool"
-		)
-	fi
-
-	cmake_src_configure
-
-	if use test; then
-		local sys_dir=( "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/lib/* )
-		[[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
-		[[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
-
-		# copy clang over since resource_dir is located relatively to binary
-		# therefore, we can put our new libraries in it
-		mkdir -p "${BUILD_DIR}"/lib/{llvm/${LLVM_MAJOR}/{bin,$(get_libdir)},clang/${LLVM_MAJOR}/include} || die
-		cp "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/bin/clang{,++} \
-			"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/bin/ || die
-		cp "${EPREFIX}"/usr/lib/clang/${LLVM_MAJOR}/include/*.h \
-			"${BUILD_DIR}"/lib/clang/${LLVM_MAJOR}/include/ || die
-		cp "${sys_dir}"/*builtins*.a \
-			"${BUILD_DIR}/lib/clang/${LLVM_MAJOR}/lib/${sys_dir##*/}/" || die
-		# we also need LLVMgold.so for gold-based tests
-		if [[ -f ${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so ]]; then
-			ln -s "${EPREFIX}"/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/LLVMgold.so \
-				"${BUILD_DIR}"/lib/llvm/${LLVM_MAJOR}/$(get_libdir)/ || die
-		fi
-	fi
-}
-
-src_test() {
-	# respect TMPDIR!
-	local -x LIT_PRESERVES_TMP=1
-	# disable sandbox to have it stop clobbering LD_PRELOAD
-	local -x SANDBOX_ON=0
-	# wipe LD_PRELOAD to make ASAN happy
-	local -x LD_PRELOAD=
-
-	cmake_build check-all
-}


^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2025-02-15  7:19 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-15  4:24 [gentoo-commits] repo/gentoo:master commit in: llvm-runtimes/compiler-rt-sanitizers/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2025-02-15  7:19 Michał Górny
2025-02-13  7:53 Michał Górny
2025-02-11 11:29 Michał Górny
2025-02-08 11:51 Michał Górny
2025-02-07 20:08 Arthur Zamarin
2025-02-02 18:25 Michał Górny
2025-02-01 13:15 Michał Górny
2025-02-01  8:05 Michał Górny
2025-01-31 21:51 Michał Górny
2025-01-25 13:33 Michał Górny
2025-01-22 19:15 Michał Górny
2025-01-18 15:09 Michał Górny
2025-01-18  8:21 Michał Górny
2025-01-11 18:12 Michał Górny
2025-01-04 15:28 Michał Górny
2024-12-28 19:35 Michał Górny
2024-12-27 21:25 Michał Górny
2024-12-21 10:28 Michał Górny
2024-12-17 21:37 Michał Górny
2024-12-16  5:57 Michał Górny
2024-12-12 12:27 Michał Górny
2024-12-12  5:03 Sam James
2024-12-12  5:03 Sam James
2024-12-12  5:03 Sam James
2024-12-12  5:03 Sam James
2024-12-12  5:03 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox