summaryrefslogtreecommitdiff
path: root/llvm-runtimes/compiler-rt-sanitizers
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-02-02 22:43:17 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-02-02 22:43:17 +0000
commit44f7bdd4803ecacf7943d21fdf2531eb2ea9aeff (patch)
tree4710102399c8e8f01d716ea1139c8fd2db449d7d /llvm-runtimes/compiler-rt-sanitizers
parent417ef5d7c7bd36af15766ab14554600fbe7daed7 (diff)
gentoo auto-resync : 02:02:2025 - 22:43:16
Diffstat (limited to 'llvm-runtimes/compiler-rt-sanitizers')
-rw-r--r--llvm-runtimes/compiler-rt-sanitizers/Manifest3
-rw-r--r--llvm-runtimes/compiler-rt-sanitizers/compiler-rt-sanitizers-20.1.0_rc1.ebuild222
2 files changed, 225 insertions, 0 deletions
diff --git a/llvm-runtimes/compiler-rt-sanitizers/Manifest b/llvm-runtimes/compiler-rt-sanitizers/Manifest
index 7ae733d77fe2..2a7cd9dfecd2 100644
--- a/llvm-runtimes/compiler-rt-sanitizers/Manifest
+++ b/llvm-runtimes/compiler-rt-sanitizers/Manifest
@@ -15,6 +15,8 @@ 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
EBUILD compiler-rt-sanitizers-15.0.7-r1.ebuild 6678 BLAKE2B 0261091e2c7a6a60e60811f0a04313689bedb56fccd645e595cacb0c85b7457007743d4f8be92e04c452031a0c2a314745ffee612ca724b796347a7b82d0253a SHA512 daf41b0aa6faf374b4d1cbb34234c5d0c3344aad72f80b50082eddd0e31f746451f44bb3bfc3f3a185ea139db846fac750d99d712b7e7f010a3b14c8e62b2060
EBUILD compiler-rt-sanitizers-16.0.6-r1.ebuild 6665 BLAKE2B 3f465a8716096f3476f1bd46f3dfa959800e1ea0d46a062f02de600b9160043320c2edb02caa91f52ec18fca1d93bef2054395411962aea83f045b0cde4d9b57 SHA512 184805f8bdcf0fa8adc6196f26143d90b983cc61dc6f8ab23bc699dd6dd109cc07531ca87d4fae7d259cb8922bea14b37ae35237da9a824b0e62e960eac13476
@@ -23,6 +25,7 @@ EBUILD compiler-rt-sanitizers-18.1.8-r6.ebuild 6409 BLAKE2B d83c18a2f723f3cd1afb
EBUILD compiler-rt-sanitizers-19.1.4.ebuild 6484 BLAKE2B b39cf4225885bbc39e55fc7e7b7b9c63ad3482ecc5313d93829c9c33fdfb30247499337f6089e5e03b74245aaf18307f31a66e965483ab24d9102fc860f2a772 SHA512 ee9a02d2c2d653294d9d8b0190938b0496515deb49ce169aba84bf07159e6f7675da8d3ea6f9456473adce3643765c4a557799a73d4dd563eb6b34aace84a5a4
EBUILD compiler-rt-sanitizers-19.1.7.ebuild 6489 BLAKE2B d512e9d05e4f3d0ebb688caf741528bf1c3be9870dddca3dd774b6d368bcf5ec3784426b73e78c37d562f0d0218daccd69fd159b8eb75acdfd2bdf08da82ba03 SHA512 0a2c2c6225f5cb5e8d47ba374fbf6db294b042811b4b9d988b3999cee711dbf0722b757e181945d78ff354f01ed11293330e2cf236cb3549f89a959511a7e11f
EBUILD compiler-rt-sanitizers-20.0.0_pre20250125.ebuild 6404 BLAKE2B d317bd4d4c43deae61c6c6accd7b6db68d3ef16af965c9eed30a85483e2299a63e1d1acab7f5e080f98027408d66ca4057db0c3eccbcd94abfdabf51dae1b25d SHA512 5406797df47f496af1f57bfc25f2e1ccf2decf3607c9d03bf7561e1c0f820d7c67006614c35e448eca7c33d299dd355195a0c041d96a27fab3c6b5655d23fbbe
+EBUILD compiler-rt-sanitizers-20.1.0_rc1.ebuild 6404 BLAKE2B d317bd4d4c43deae61c6c6accd7b6db68d3ef16af965c9eed30a85483e2299a63e1d1acab7f5e080f98027408d66ca4057db0c3eccbcd94abfdabf51dae1b25d SHA512 5406797df47f496af1f57bfc25f2e1ccf2decf3607c9d03bf7561e1c0f820d7c67006614c35e448eca7c33d299dd355195a0c041d96a27fab3c6b5655d23fbbe
EBUILD compiler-rt-sanitizers-21.0.0.9999.ebuild 6404 BLAKE2B d317bd4d4c43deae61c6c6accd7b6db68d3ef16af965c9eed30a85483e2299a63e1d1acab7f5e080f98027408d66ca4057db0c3eccbcd94abfdabf51dae1b25d SHA512 5406797df47f496af1f57bfc25f2e1ccf2decf3607c9d03bf7561e1c0f820d7c67006614c35e448eca7c33d299dd355195a0c041d96a27fab3c6b5655d23fbbe
EBUILD compiler-rt-sanitizers-21.0.0_pre20250201.ebuild 6404 BLAKE2B d317bd4d4c43deae61c6c6accd7b6db68d3ef16af965c9eed30a85483e2299a63e1d1acab7f5e080f98027408d66ca4057db0c3eccbcd94abfdabf51dae1b25d SHA512 5406797df47f496af1f57bfc25f2e1ccf2decf3607c9d03bf7561e1c0f820d7c67006614c35e448eca7c33d299dd355195a0c041d96a27fab3c6b5655d23fbbe
MISC metadata.xml 1657 BLAKE2B 9fd760c7d197b4bf4effd441027b22a0705e70294d1962a8c9b045897e206c5e222bfdb7b0e27e4753c9103f836ac4614f523d34a7621b0bf03770171aafdede SHA512 4800ff405f3599775e6276b0ce36043a702f328b14f1b8cfe940be5115d1787193be5475ad9323a6770e7621d7253db660e5de57797503d878dca67de934702e
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
+}