From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1663408-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 0841015852A
	for <garchives@archives.gentoo.org>; Thu, 22 Aug 2024 11:23:54 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id CC9FF2BC019;
	Thu, 22 Aug 2024 11:23:52 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id B09D02BC019
	for <gentoo-commits@lists.gentoo.org>; Thu, 22 Aug 2024 11:23:52 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id C6BA1342F64
	for <gentoo-commits@lists.gentoo.org>; Thu, 22 Aug 2024 11:23:51 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 45A071F09
	for <gentoo-commits@lists.gentoo.org>; Thu, 22 Aug 2024 11:23:49 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1724325818.193ce0ecb45b456155fc15eed671ce0f5cc5dfee.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/lld/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-devel/lld/Manifest sys-devel/lld/lld-20.0.0_pre20240822.ebuild
X-VCS-Directories: sys-devel/lld/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 193ce0ecb45b456155fc15eed671ce0f5cc5dfee
X-VCS-Branch: master
Date: Thu, 22 Aug 2024 11:23:49 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 07cbe16a-7e9b-4619-8405-0e7e08953447
X-Archives-Hash: c851ece6f0a2334a6b341b377523f073

commit:     193ce0ecb45b456155fc15eed671ce0f5cc5dfee
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 22 11:16:17 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 11:23:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=193ce0ec

sys-devel/lld: Add 20.0.0_pre20240822 snapshot

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

 sys-devel/lld/Manifest                      |  1 +
 sys-devel/lld/lld-20.0.0_pre20240822.ebuild | 93 +++++++++++++++++++++++++++++
 2 files changed, 94 insertions(+)

diff --git a/sys-devel/lld/Manifest b/sys-devel/lld/Manifest
index 381e6ab76292..b8cbad213b50 100644
--- a/sys-devel/lld/Manifest
+++ b/sys-devel/lld/Manifest
@@ -11,5 +11,6 @@ DIST llvm-project-19.1.0-rc2.src.tar.xz 141264388 BLAKE2B 690b4912d9e4a8019b7990
 DIST llvm-project-19.1.0-rc2.src.tar.xz.sig 438 BLAKE2B 1eaf10a1419ecf009c033a8f6ecb6eec86107d81621d5b4665c8d929b05f4845ce0c432017343d7b06f33e6ff6384df9e1d8fc7b9c6efe7f10ef69798891b7e5 SHA512 b46e9a1d40f891c5f3544d8cc6295900bff5dda9a4a526b8db55a42a37ae90deb216b316d2117984e82f4e918d15343e75b3b9e6d6c773866707c3398e032826
 DIST llvm-project-19.1.0-rc3.src.tar.xz 141250388 BLAKE2B 6530bede000d2e4b8ce10b445bfc1f81dc25c2d7121fc953581cd9b6989b3ba197707cd79d3c7b94c055bf2e21b0d07ab3cb401d3f73d22eefba6da4b71dca7b SHA512 3ee4eab848e5e38c396e6f5addf5eb42570d451fc8e7cd77150dc5542f8f710f4a9db51836f7a799996dd1b8194defe4d58efe7c19e5d5e1c5f3dbdda94c0cf3
 DIST llvm-project-19.1.0-rc3.src.tar.xz.sig 438 BLAKE2B 86bad4d4fb805340096473bc603d7a3483f030f62b6f52b64d12c33561fbbb999c2ab69cc94857a32747492c846a5ab631a84da200b03475fd401335373bbccf SHA512 ef0fd2e3e7069fbfd410cbcf71294d1b7182456330ff151348058b5cb0f292edaecb9dcbf613ee4fc979214a23bd3bb8077d71e674635359da36b938dc143266
+DIST llvm-project-503907dc505db1e439e7061113bf84dd105f2e35.tar.gz 218750576 BLAKE2B 40904dbf62cffe9cb757cc1382a765d5c89791948e86bfa4fbdc5a78ebc11cc82588bc730e6c5c84b6d84922cd32290df0146733a013ffa4e408b8a7c2313a1f SHA512 a121cca2ef49c6b25f137e66d23d332d2f9e3bd0d349b1202b6869f7c85a141aecfe20a6c4d4eff84e32a243216740f20114968589207d39df229daf6443ba0d
 DIST llvm-project-db8ef6188cbbe2125e6d60bdef77a535105772df.tar.gz 218416682 BLAKE2B 691e3881e4a60c008c6b766b51ecc856122de1f40242ff1d91ebaa12682fea0a22f84783eb930c42d196f50ba0d3b2010f9010ed73ee7e292fe78c93d6e3f324 SHA512 2dc16a603b60607cc3daee2de0126a567a78c4fff72b2fbcb94c82472bc5ec64ac354ba8592b9a643248a5bfd43b34e2a60f2751a0c9e9e28b7f895fc50a5e9d
 DIST llvm-project-fd7d7882e7fa5a38d4bfde426120d4663718beb4.tar.gz 218217769 BLAKE2B a6c2aa012c342e31527b7e9f85e8fea3549d52530d8f87cd699e094a0aa768d099f9fd2631161ff7f53b4a5011937ed6d1f52b8fa1d23aa34183be1f487d4277 SHA512 c4863fab1a3c03f7f9c42f3501d3a75cebb491343515d77d30b26e5cbd720fc3fd628052099d87ed638e8c424bcbe7a1d066ed857f73da6f243d3d5a76b0e6c5

diff --git a/sys-devel/lld/lld-20.0.0_pre20240822.ebuild b/sys-devel/lld/lld-20.0.0_pre20240822.ebuild
new file mode 100644
index 000000000000..79558afa1abe
--- /dev/null
+++ b/sys-devel/lld/lld-20.0.0_pre20240822.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit cmake flag-o-matic llvm.org llvm-utils python-any-r1 toolchain-funcs
+
+DESCRIPTION="The LLVM linker (link editor)"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="+debug test zstd"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	~sys-devel/llvm-${PV}[debug=,zstd=]
+	sys-libs/zlib:=
+	zstd? ( app-arch/zstd:= )
+"
+RDEPEND="
+	${DEPEND}
+	!sys-devel/lld:0
+"
+BDEPEND="
+	sys-devel/llvm:${LLVM_MAJOR}
+	test? (
+		$(python_gen_any_dep ">=dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
+	)
+"
+PDEPEND="
+	>=sys-devel/lld-toolchain-symlinks-16-r2:${LLVM_MAJOR}
+"
+
+LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o )
+llvm.org_set_globals
+
+python_check_deps() {
+	python_has_version ">=dev-python/lit-${PV}[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+	use test && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+	llvm.org_src_unpack
+
+	# Directory ${WORKDIR}/llvm does not exist with USE="-test",
+	# but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below,
+	# and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system
+	# (lld/MachO/CMakeLists.txt) and is expected to be resolvable
+	# to existent directory ${WORKDIR}/libunwind/include.
+	mkdir -p "${WORKDIR}/llvm" || die
+}
+
+src_configure() {
+	llvm_prepend_path "${LLVM_MAJOR}"
+
+	# ODR violations (https://github.com/llvm/llvm-project/issues/83529, bug #922353)
+	filter-lto
+
+	# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+	use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+	use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+	local mycmakeargs=(
+		-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+		-DBUILD_SHARED_LIBS=ON
+		-DLLVM_INCLUDE_TESTS=$(usex test)
+		-DLLVM_ENABLE_ZLIB=FORCE_ON
+		-DLLVM_ENABLE_ZSTD=$(usex zstd FORCE_ON OFF)
+	)
+
+	use test && mycmakeargs+=(
+		-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+		-DLLVM_LIT_ARGS="$(get_lit_flags)"
+		-DPython3_EXECUTABLE="${PYTHON}"
+	)
+
+	tc-is-cross-compiler &&	mycmakeargs+=(
+		-DLLVM_TABLEGEN_EXE="${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/bin/llvm-tblgen"
+	)
+
+	cmake_src_configure
+}
+
+src_test() {
+	local -x LIT_PRESERVES_TMP=1
+	cmake_build check-lld
+}