1 |
commit: d141c7eb5e150fa883322268b6946f914d4c96a3 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 5 19:48:38 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 5 19:49:55 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d141c7eb |
7 |
|
8 |
sys-devel/lld: Add 16.* live ebuilds |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-devel/lld/lld-16.0.0.9999.ebuild | 78 ++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 78 insertions(+) |
14 |
|
15 |
diff --git a/sys-devel/lld/lld-16.0.0.9999.ebuild b/sys-devel/lld/lld-16.0.0.9999.ebuild |
16 |
new file mode 100644 |
17 |
index 000000000000..019425b4e1fa |
18 |
--- /dev/null |
19 |
+++ b/sys-devel/lld/lld-16.0.0.9999.ebuild |
20 |
@@ -0,0 +1,78 @@ |
21 |
+# Copyright 1999-2022 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=8 |
25 |
+ |
26 |
+PYTHON_COMPAT=( python3_{8..11} ) |
27 |
+inherit cmake flag-o-matic llvm llvm.org python-any-r1 |
28 |
+ |
29 |
+DESCRIPTION="The LLVM linker (link editor)" |
30 |
+HOMEPAGE="https://llvm.org/" |
31 |
+ |
32 |
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" |
33 |
+SLOT="0" |
34 |
+KEYWORDS="" |
35 |
+IUSE="debug test" |
36 |
+RESTRICT="!test? ( test )" |
37 |
+ |
38 |
+DEPEND=" |
39 |
+ ~sys-devel/llvm-${PV} |
40 |
+" |
41 |
+RDEPEND=" |
42 |
+ ${DEPEND} |
43 |
+" |
44 |
+BDEPEND=" |
45 |
+ test? ( |
46 |
+ >=dev-util/cmake-3.16 |
47 |
+ $(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]") |
48 |
+ ) |
49 |
+" |
50 |
+ |
51 |
+LLVM_COMPONENTS=( lld cmake libunwind/include/mach-o ) |
52 |
+LLVM_TEST_COMPONENTS=( llvm/utils/{lit,unittest} ) |
53 |
+llvm.org_set_globals |
54 |
+ |
55 |
+python_check_deps() { |
56 |
+ has_version -b "dev-python/lit[${PYTHON_USEDEP}]" |
57 |
+} |
58 |
+ |
59 |
+pkg_setup() { |
60 |
+ LLVM_MAX_SLOT=${PV%%.*} llvm_pkg_setup |
61 |
+ use test && python-any-r1_pkg_setup |
62 |
+} |
63 |
+ |
64 |
+src_unpack() { |
65 |
+ llvm.org_src_unpack |
66 |
+ |
67 |
+ # Directory ${WORKDIR}/llvm does not exist with USE="-test", |
68 |
+ # but LLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" is set below, |
69 |
+ # and ${LLVM_MAIN_SRC_DIR}/../libunwind/include is used by build system |
70 |
+ # (lld/MachO/CMakeLists.txt) and is expected to be resolvable |
71 |
+ # to existent directory ${WORKDIR}/libunwind/include. |
72 |
+ mkdir -p "${WORKDIR}/llvm" || die |
73 |
+} |
74 |
+ |
75 |
+src_configure() { |
76 |
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844 |
77 |
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG" |
78 |
+ |
79 |
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152 |
80 |
+ |
81 |
+ local mycmakeargs=( |
82 |
+ -DBUILD_SHARED_LIBS=ON |
83 |
+ -DLLVM_INCLUDE_TESTS=$(usex test) |
84 |
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm" |
85 |
+ ) |
86 |
+ use test && mycmakeargs+=( |
87 |
+ -DLLVM_BUILD_TESTS=ON |
88 |
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" |
89 |
+ -DLLVM_LIT_ARGS="$(get_lit_flags)" |
90 |
+ -DPython3_EXECUTABLE="${PYTHON}" |
91 |
+ ) |
92 |
+ cmake_src_configure |
93 |
+} |
94 |
+ |
95 |
+src_test() { |
96 |
+ local -x LIT_PRESERVES_TMP=1 |
97 |
+ cmake_build check-lld |
98 |
+} |