summaryrefslogtreecommitdiff
path: root/sys-devel/llvm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /sys-devel/llvm
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/Manifest19
-rw-r--r--sys-devel/llvm/llvm-10.0.0.ebuild2
-rw-r--r--sys-devel/llvm/llvm-10.0.1.ebuild (renamed from sys-devel/llvm/llvm-10.0.1_rc1.ebuild)2
-rw-r--r--sys-devel/llvm/llvm-11.0.0.9999.ebuild9
-rw-r--r--sys-devel/llvm/llvm-11.0.0_rc1.ebuild (renamed from sys-devel/llvm/llvm-10.0.1.9999.ebuild)19
-rw-r--r--sys-devel/llvm/llvm-11.0.0_rc2.ebuild (renamed from sys-devel/llvm/llvm-10.0.1_rc2.ebuild)52
-rw-r--r--sys-devel/llvm/llvm-12.0.0.9999.ebuild (renamed from sys-devel/llvm/llvm-8.0.1.ebuild)342
7 files changed, 333 insertions, 112 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index 9e059840939f..b29092c510ca 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -3,18 +3,17 @@ AUX 10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch 983 BLAKE2B af
AUX 9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch 1188 BLAKE2B 72311a8da991b9f3b98523baefe6f5b31aa7f9101c388f35484dd5f384a08e838ea42a17447ca17a0dfe6b7d3c20abbdf0e8afee72e8ad5d46ec38b8d55307c8 SHA512 0ada997db2a0eb875105fb212dc3fc3077b9c4f7804d78c33c4b1f512bf1267295f325153ae14c00404c86e576ae1c78a6aeb0a57d1d4525aabd1169c21806ef
AUX 9999/musl-fixes.patch 1258 BLAKE2B fe275412bc908884239ea71de9a9ddf1d2f64debaa1a9ada18170195a7775c41571600ed3666343bf967aff5f9117900f73155f60de5077bc4584cfc2f782f53 SHA512 314dcbe846a66312c9f1634f4ff3f4670b3db1d3210bb550f1d3877a423333ba042da2e90c8736918a36be4d4faf58dab8d3236d4f26df5af7f7f019b0e0ec8f
DIST llvm-10.0.0-manpages.tar.bz2 177084 BLAKE2B 16b38e60fce4d67ac602b317ea7089c095d46b9426ba9940041e65d7ab493f85dba2e94a4aeba7b7c52042f23825efcfcd32a57d306aaf05b4307061a5a8a368 SHA512 eac57ad218ff4c2b5a74e453a29192ee6e911152b668d8a9420b59529d5cae8aa241f2485b4a7ea304acbecc7ecb27391a77552080726432c2b7b59b95fc0bd7
-DIST llvm-8.0.1-manpages.tar.bz2 140915 BLAKE2B 13ac9e172728d643dac1d12ac06909b6db3dd9a1a380a92a07867e3cb835f94b265da5d75c4712b5409405a65795d2cb6b32da4098e38cbb95d7023b56bcbbc1 SHA512 23994a2374659fbbf8d9b5160f4d77e9be7c4c9fc14963e8186bbede78b0ee9257f6b6a9c484bc75d72443d65bb24e598841e64af500336283de0f454d6a2073
-DIST llvm-8.0.1.src.tar.xz 30477608 BLAKE2B 4319c837b36111401e3b0f9659b8d875c89463bcc7816df1aefe1e3ff989860bbaa92504718f8e15416cfd9f3491c13777cd5cb661877b237b342b0e515b93f5 SHA512 82e120be5cabdfd5111aebbea68a663fe229c8861d73802d6ab09a3bf48f60de333e07e61f8fb61beaa14ac2bea24fcd74fa6f761acaf62469f536b79fcb1e16
DIST llvm-9.0.0-manpages.tar.bz2 158546 BLAKE2B eed6235698a0b5993affe305f7fd22cd4cf444adf931275a1685f2049a5f17cf2933907577d9ce142348a3c579769b0436aa2b5a9a953958504125a8c3e83b7d SHA512 64c8d18061eb2870b379a1df485be0b61eac07cb10b3f97347b54b2ee326faa63437ca04466776be282e120dd3f6147e14fffdd38ca370db85748fe5eb54d764
DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0
-DIST llvmorg-10.0.1-rc1.tar.gz 120834583 BLAKE2B 64244ebcb6f2c171c9f606e5eb0adff2794f06c9312a0ca627fb79c107c0c898ac242cf4e92523c3265fa717322601d7e3f4d178515fac95d03ee92312082b06 SHA512 f877f66046969a4055b166ad50ef876a9c8ecaf03e2cdd7c8e1a3348eb5f5180f222fa457b1f090a6660282a0d9f7a1d39cf09a04abe0dde0a6e1e10ccf15597
-DIST llvmorg-10.0.1-rc2.tar.gz 120883192 BLAKE2B d48f4ccb33691cd4997576a6d20b298455687515164f7d8dfa11ec32e197b58132c6bd549c1214c3b36982ef85e1018d4101e7afecee8d2ab67ad15d68c681bf SHA512 8e363d379a73e38ef570fb03d8243a21f37a48ef579a0f08118af4dac48060c0dc24e2bd8175f04241fa424e49b6c85723d2d3552bbe30dd165fe5fb43493325
+DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
+DIST llvmorg-11.0.0-rc1.tar.gz 122688246 BLAKE2B 10ff3f08ff3780abb1d86ac67942e6aac52ff5daf820a2e3d23d8b79dbade1c5b1d398d0a577028d2d7c8759ab9a8b552a0305b5750310a015585c06cdadf844 SHA512 09564ed903902a5795fffaa4679badc30bf49739889a48074b5ae2c93bd29000cfb36a650208d5cae5d74899bade066f84b4aa023fc852eec246ff67bf64a267
+DIST llvmorg-11.0.0-rc2.tar.gz 122728230 BLAKE2B 7944adf41ec7cd82489666a0a38a857de628879d59a2e3bb566b67c18500092430db66ff214d45cb324128c874a74a72c367b452df3b88ec95b33c284dd35512 SHA512 25eb2879eb22e79a1e840ef24cf3f5eec602e947101db299393e06e3d09f2d1531eef214264636e1b511eafff7f51b1834d5a03976ccd088eb680745b147e9f3
DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
-EBUILD llvm-10.0.0.ebuild 10755 BLAKE2B a9cd0916e9d9f750d4d004759dce1208643fc032e07a6642aa796a2fe432578e1866a8e3f879265895268ebe49a740f16df2dec5c95d06fbc0c5f4aecec84d2f SHA512 e224360bda7a170db324ecc797db08df22e3c12426d4445edba11a2ec811024688166dd8faf7ee6ddfac317abf8f1d72da433c15aaff44ab282508c4245eccfe
-EBUILD llvm-10.0.1.9999.ebuild 12625 BLAKE2B b3a38bdaf43ff15935f928cf75b664f80b038f5bfaf8e3a87c417fa73ec0098b03b341d0dbb757333b9bd692f23708bf74dcf2ee0861062181dd88015389b655 SHA512 5fc03257797fdc6b0ec3a254a4ca51ac9ac3df1abd777a5b37c8eb44189d37d51def4c243824ccee878f73efc64e43d5d2a9e651cf3b764a3ba786e620a4dacc
-EBUILD llvm-10.0.1_rc1.ebuild 11632 BLAKE2B f335286bf86b9c18b7d219a65b3ed54d47676939323fda1b420943da2deab141bc43d80bed9d83aea48824eaec15438d07854964a5a7db3ac41e4034b079623e SHA512 e9dede97e3d9d755fd518cf6bb7296bacd738a85e23abcadc4487abeb3ab4f7e380187c27114e0c64c4c0934f0414ca47e9c17e3cd9f317cae0d505ef858f4d0
-EBUILD llvm-10.0.1_rc2.ebuild 11632 BLAKE2B f335286bf86b9c18b7d219a65b3ed54d47676939323fda1b420943da2deab141bc43d80bed9d83aea48824eaec15438d07854964a5a7db3ac41e4034b079623e SHA512 e9dede97e3d9d755fd518cf6bb7296bacd738a85e23abcadc4487abeb3ab4f7e380187c27114e0c64c4c0934f0414ca47e9c17e3cd9f317cae0d505ef858f4d0
-EBUILD llvm-11.0.0.9999.ebuild 12456 BLAKE2B 15e4590aa8a1e9ee8a1c0fa65415802bf723725ecbc8ddd34a27a7c6d833d513ed8937268d3e004ee7afc2a1722302f72ed107ad1d714d789fb2191f83471155 SHA512 8a4348c9d61e06b069db1a09ee8ed6996d6875269a87ab1415d0eab23917eec3865dbb190352c813daaad620d7bd0c67d22cfac8818b329bc246af241cac74b2
-EBUILD llvm-8.0.1.ebuild 8423 BLAKE2B 229579ed2cd28987476612666617c61af49760ace9b4664a4419f2518990666d88a2c234d55f7f9c89d04e4a107b34cad50ce7866e4fa944829b0eb3f7473a2b SHA512 307e04c4dac29e8b3fef2a422d231883883384b23fc9d54c8f5f9e69b9f40fb3ea7950651cc15938e0ea92a12413db67996b87b59ec88cf3ba4661b6099602e7
+EBUILD llvm-10.0.0.ebuild 10751 BLAKE2B 338970325836138a0214d3e97e1b408b466052abe7bda4815edcb41e3b998a7b9df26bcf2caf457ee8b66d997b383a0f94a196a580671db4b5288b8522e48bb5 SHA512 c588a1cce4e950bdbd189ad0f44c1b9377adc5bdf041a1da4872cc2d629d79f73132f1776cee09d8e08cd799aa7bc0473915d3a3644606e3cc26f5329b533194
+EBUILD llvm-10.0.1.ebuild 11708 BLAKE2B 5acc39aeea89c56ebe9a0015b503df6513ea528dbee71931eab5f571eca3045dfbdaead324dff79038b802d00c1a9f929b81f8e136adb33f78764f8cb38c7ac0 SHA512 e727805e3e55ff1fb662b6d1cbd191541085af64967660aeec41bc6bdd4c24f700995935d1ffee995fd5caa0c3f8f371c1fc94f46c62f493f4ca966f997befa9
+EBUILD llvm-11.0.0.9999.ebuild 12325 BLAKE2B 41fe35b64d8f98a89f1a0ccab2861ad2d8ac4073ca944fa0f29d51246a9df5d06fd94ce2e68983e4936341c72c5d296b2af1dc8eb3414645f533afcb664653ed SHA512 d3e15dd002796b0f4b06daad6d33ed14f96b60eb45db74584c2b39878c0b064c5f185edf728d11e943b930f508f115cc3b88c05bc0da8274a42749bd8a88e528
+EBUILD llvm-11.0.0_rc1.ebuild 12325 BLAKE2B 41fe35b64d8f98a89f1a0ccab2861ad2d8ac4073ca944fa0f29d51246a9df5d06fd94ce2e68983e4936341c72c5d296b2af1dc8eb3414645f533afcb664653ed SHA512 d3e15dd002796b0f4b06daad6d33ed14f96b60eb45db74584c2b39878c0b064c5f185edf728d11e943b930f508f115cc3b88c05bc0da8274a42749bd8a88e528
+EBUILD llvm-11.0.0_rc2.ebuild 12325 BLAKE2B 41fe35b64d8f98a89f1a0ccab2861ad2d8ac4073ca944fa0f29d51246a9df5d06fd94ce2e68983e4936341c72c5d296b2af1dc8eb3414645f533afcb664653ed SHA512 d3e15dd002796b0f4b06daad6d33ed14f96b60eb45db74584c2b39878c0b064c5f185edf728d11e943b930f508f115cc3b88c05bc0da8274a42749bd8a88e528
+EBUILD llvm-12.0.0.9999.ebuild 12348 BLAKE2B 2a40e5ce5c5f930d7a50da3bae3fd3324ffdd4e9b0824e440d2f741fca13b4acb9094948961951d20a1ac14f2bbbff24fc92c693ab132eb10917d790d970b9c2 SHA512 f107d05eda19a34c4a0cf8204ce1fdba0683b9d096ed2f3ebde36c59bc666bc4e159d82782d5a12624fc193f49224cf51313312dd222a85c54977900a31f521d
EBUILD llvm-9.0.1.ebuild 8454 BLAKE2B 33b4c7bdf4bc136d29f3f6f505799b11de31d33e393b51c9bafb121b0b8b347e86a5954ba6ba039cd6b39cb7c1a501d4747f51652351559c42ba0b84c4bae54b SHA512 f43a600265c1559e924a6f2ec97dffdacfae35df2cc3e3e874704c5ae179ba48d90fdd666411cdab500d171fa63b557538282545c7c4078867857e077c941a4c
MISC metadata.xml 2563 BLAKE2B ca85030788fb213fc891d895238fd75562cdd25cc5fe4271d709cb1c00ef56b0e8b367dc70cc18f7d185d6fbdb57333e219a984220b60141d28fb4784b2cb94a SHA512 8de68ee7f964e6eb2613bd2ff584f834e0f5a3ae8b303b5f2f10fda718a87af9b8ddfc19399950fe4eb8be515930124ced8018190af0f69da7ec5fe8180a68a2
diff --git a/sys-devel/llvm/llvm-10.0.0.ebuild b/sys-devel/llvm/llvm-10.0.0.ebuild
index d5dfa7b4da31..5abee337a223 100644
--- a/sys-devel/llvm/llvm-10.0.0.ebuild
+++ b/sys-devel/llvm/llvm-10.0.0.ebuild
@@ -31,7 +31,7 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3
kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
diff --git a/sys-devel/llvm/llvm-10.0.1_rc1.ebuild b/sys-devel/llvm/llvm-10.0.1.ebuild
index bc805c1b4d35..2bdf59ccedd7 100644
--- a/sys-devel/llvm/llvm-10.0.1_rc1.ebuild
+++ b/sys-devel/llvm/llvm-10.0.1.ebuild
@@ -28,7 +28,7 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
SLOT="$(ver_cut 1)"
-KEYWORDS=""
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3
kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
diff --git a/sys-devel/llvm/llvm-11.0.0.9999.ebuild b/sys-devel/llvm/llvm-11.0.0.9999.ebuild
index 08addcf459df..6ee898821d6b 100644
--- a/sys-devel/llvm/llvm-11.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-11.0.0.9999.ebuild
@@ -181,13 +181,6 @@ src_prepare() {
# Update config.guess to support more systems
cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
- # manpages don't use markdown
- if ! use doc; then
- sed -e "s:, 'recommonmark'::" \
- -e '/markdown/d' \
- -i docs/conf.py || die
- fi
-
# Verify that the live ebuild is up-to-date
check_live_ebuild
@@ -442,7 +435,7 @@ multilib_src_configure() {
}
multilib_src_compile() {
- cmake_src_compile
+ cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
diff --git a/sys-devel/llvm/llvm-10.0.1.9999.ebuild b/sys-devel/llvm/llvm-11.0.0_rc1.ebuild
index 0cbd220d5637..6ee898821d6b 100644
--- a/sys-devel/llvm/llvm-10.0.1.9999.ebuild
+++ b/sys-devel/llvm/llvm-11.0.0_rc1.ebuild
@@ -13,9 +13,9 @@ LLVM_COMPONENTS=( llvm )
llvm.org_set_globals
# Those are in lib/Targets, without explicit CMakeLists.txt mention
-ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR VE )
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC VE )
# Keep in sync with CMakeLists.txt
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore
"${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" )
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
@@ -70,12 +70,6 @@ RDEPEND="${RDEPEND}
PDEPEND="sys-devel/llvm-common
gold? ( >=sys-devel/llvmgold-${SLOT} )"
-PATCHES=(
- # Fix linking to dylib and .a libs simultaneously
- "${FILESDIR}"/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
- "${FILESDIR}"/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch
-)
-
python_check_deps() {
if use doc; then
has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
@@ -187,11 +181,6 @@ src_prepare() {
# Update config.guess to support more systems
cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
- # manpages don't use markdown
- if ! use doc; then
- sed -i -e '/source_parsers/d' docs/conf.py || die
- fi
-
# Verify that the live ebuild is up-to-date
check_live_ebuild
@@ -269,6 +258,7 @@ get_distribution_components() {
llvm-elfabi
llvm-exegesis
llvm-extract
+ llvm-gsymutil
llvm-ifs
llvm-install-name-tool
llvm-jitlink
@@ -279,6 +269,7 @@ get_distribution_components() {
llvm-lto2
llvm-mc
llvm-mca
+ llvm-ml
llvm-modextract
llvm-mt
llvm-nm
@@ -444,7 +435,7 @@ multilib_src_configure() {
}
multilib_src_compile() {
- cmake_src_compile
+ cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
diff --git a/sys-devel/llvm/llvm-10.0.1_rc2.ebuild b/sys-devel/llvm/llvm-11.0.0_rc2.ebuild
index bc805c1b4d35..6ee898821d6b 100644
--- a/sys-devel/llvm/llvm-10.0.1_rc2.ebuild
+++ b/sys-devel/llvm/llvm-11.0.0_rc2.ebuild
@@ -13,9 +13,9 @@ LLVM_COMPONENTS=( llvm )
llvm.org_set_globals
# Those are in lib/Targets, without explicit CMakeLists.txt mention
-ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC AVR )
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC VE )
# Keep in sync with CMakeLists.txt
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore
"${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" )
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
@@ -70,12 +70,6 @@ RDEPEND="${RDEPEND}
PDEPEND="sys-devel/llvm-common
gold? ( >=sys-devel/llvmgold-${SLOT} )"
-PATCHES=(
- # Fix linking to dylib and .a libs simultaneously
- "${FILESDIR}"/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
- "${FILESDIR}"/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch
-)
-
python_check_deps() {
if use doc; then
has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
@@ -84,6 +78,38 @@ python_check_deps() {
has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
+check_live_ebuild() {
+ local prod_targets=(
+ $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
+ | tail -n +2 | head -n -1)
+ )
+ local all_targets=(
+ lib/Target/*/
+ )
+ all_targets=( "${all_targets[@]#lib/Target/}" )
+ all_targets=( "${all_targets[@]%/}" )
+
+ local exp_targets=() i
+ for i in "${all_targets[@]}"; do
+ has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" )
+ done
+ # reorder
+ all_targets=( "${prod_targets[@]}" "${exp_targets[@]}" )
+
+ if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then
+ eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}"
+ eqawarn "Expected: ${exp_targets[*]}"
+ eqawarn
+ fi
+
+ if [[ ${all_targets[*]} != ${ALL_LLVM_TARGETS[*]#llvm_targets_} ]]; then
+ eqawarn "ALL_LLVM_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_TARGETS[*]#llvm_targets_}"
+ eqawarn "Expected: ${all_targets[*]}"
+ fi
+}
+
check_distribution_components() {
if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
local all_targets=() my_targets=() l
@@ -155,10 +181,8 @@ src_prepare() {
# Update config.guess to support more systems
cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
- # manpages don't use markdown
- if ! use doc; then
- sed -i -e '/source_parsers/d' docs/conf.py || die
- fi
+ # Verify that the live ebuild is up-to-date
+ check_live_ebuild
llvm.org_src_prepare
}
@@ -234,6 +258,7 @@ get_distribution_components() {
llvm-elfabi
llvm-exegesis
llvm-extract
+ llvm-gsymutil
llvm-ifs
llvm-install-name-tool
llvm-jitlink
@@ -244,6 +269,7 @@ get_distribution_components() {
llvm-lto2
llvm-mc
llvm-mca
+ llvm-ml
llvm-modextract
llvm-mt
llvm-nm
@@ -409,7 +435,7 @@ multilib_src_configure() {
}
multilib_src_compile() {
- cmake_src_compile
+ cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
diff --git a/sys-devel/llvm/llvm-8.0.1.ebuild b/sys-devel/llvm/llvm-12.0.0.9999.ebuild
index c466aae71395..9f6248bfa037 100644
--- a/sys-devel/llvm/llvm-8.0.1.ebuild
+++ b/sys-devel/llvm/llvm-12.0.0.9999.ebuild
@@ -1,41 +1,37 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-# (needed due to CMAKE_BUILD_TYPE != Gentoo)
-CMAKE_MIN_VERSION=3.7.0-r1
-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python3_{6..9} )
+inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
+ toolchain-funcs
-inherit cmake-utils eapi7-ver flag-o-matic multilib-minimal \
- multiprocessing pax-utils python-any-r1 toolchain-funcs
-
-MY_P=${P}.src
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
-SRC_URI="https://github.com/llvm/llvm-project/releases/download/llvmorg-${PV}/${MY_P}.tar.xz
- !doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${P}-manpages.tar.bz2 )"
+LLVM_COMPONENTS=( llvm )
+llvm.org_set_globals
+# Those are in lib/Targets, without explicit CMakeLists.txt mention
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC VE )
# Keep in sync with CMakeLists.txt
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC Sparc SystemZ WebAssembly X86 XCore )
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore
+ "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" )
ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
# Additional licenses:
# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
-# 2. ARM backend: LLVM Software Grant by ARM.
+# 2. xxhash: BSD.
# 3. MD5 code: public-domain.
-# 4. Tests (not installed):
-# a. gtest: BSD.
-# b. YAML tests: MIT.
+# 4. ConvertUTF.h: TODO.
-LICENSE="UoI-NCSA rc BSD public-domain
- llvm_targets_ARM? ( LLVM-Grant )"
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml
+KEYWORDS=""
+IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3
kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -51,21 +47,22 @@ RDEPEND="
libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
xar? ( app-arch/xar )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )"
+ xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
+ z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )"
DEPEND="${RDEPEND}
+ gold? ( sys-libs/binutils-libs )"
+BDEPEND="
dev-lang/perl
+ sys-devel/gnuconfig
kernel_Darwin? (
<sys-libs/libcxx-$(ver_cut 1-3).9999
>=sys-devel/binutils-apple-5.1
)
- doc? ( $(python_gen_any_dep '
- dev-python/recommonmark[${PYTHON_USEDEP}]
- dev-python/sphinx[${PYTHON_USEDEP}]
- ') )
- !doc? ( ${PYTHON_DEPS} )
- gold? ( sys-libs/binutils-libs )
libffi? ( virtual/pkgconfig )
- ${PYTHON_DEPS}"
+ $(python_gen_any_dep '
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] )
+ ')"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
RDEPEND="${RDEPEND}
@@ -73,18 +70,104 @@ RDEPEND="${RDEPEND}
PDEPEND="sys-devel/llvm-common
gold? ( >=sys-devel/llvmgold-${SLOT} )"
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
-
-S=${WORKDIR}/${MY_P}
+python_check_deps() {
+ if use doc; then
+ has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
+ return 1
+ fi
+ has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
+}
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
+check_live_ebuild() {
+ local prod_targets=(
+ $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
+ | tail -n +2 | head -n -1)
+ )
+ local all_targets=(
+ lib/Target/*/
+ )
+ all_targets=( "${all_targets[@]#lib/Target/}" )
+ all_targets=( "${all_targets[@]%/}" )
+
+ local exp_targets=() i
+ for i in "${all_targets[@]}"; do
+ has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" )
+ done
+ # reorder
+ all_targets=( "${prod_targets[@]}" "${exp_targets[@]}" )
+
+ if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then
+ eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}"
+ eqawarn "Expected: ${exp_targets[*]}"
+ eqawarn
+ fi
-python_check_deps() {
- use doc || return 0
+ if [[ ${all_targets[*]} != ${ALL_LLVM_TARGETS[*]#llvm_targets_} ]]; then
+ eqawarn "ALL_LLVM_TARGETS is outdated!"
+ eqawarn " Have: ${ALL_LLVM_TARGETS[*]#llvm_targets_}"
+ eqawarn "Expected: ${all_targets[*]}"
+ fi
+}
- has_version "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
+check_distribution_components() {
+ if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
+ local all_targets=() my_targets=() l
+ cd "${BUILD_DIR}" || die
+
+ while read -r l; do
+ if [[ ${l} == install-*-stripped:* ]]; then
+ l=${l#install-}
+ l=${l%%-stripped*}
+
+ case ${l} in
+ # shared libs
+ LLVM|LLVMgold)
+ ;;
+ # TableGen lib + deps
+ LLVMDemangle|LLVMSupport|LLVMTableGen)
+ ;;
+ # static libs
+ LLVM*)
+ continue
+ ;;
+ # meta-targets
+ distribution|llvm-libraries)
+ continue
+ ;;
+ # used only w/ USE=doc
+ docs-llvm-html)
+ continue
+ ;;
+ esac
+
+ all_targets+=( "${l}" )
+ fi
+ done < <(ninja -t targets all)
+
+ while read -r l; do
+ my_targets+=( "${l}" )
+ done < <(get_distribution_components $"\n")
+
+ local add=() remove=()
+ for l in "${all_targets[@]}"; do
+ if ! has "${l}" "${my_targets[@]}"; then
+ add+=( "${l}" )
+ fi
+ done
+ for l in "${my_targets[@]}"; do
+ if ! has "${l}" "${all_targets[@]}"; then
+ remove+=( "${l}" )
+ fi
+ done
+
+ if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
+ eqawarn "get_distribution_components() is outdated!"
+ eqawarn " Add: ${add[*]}"
+ eqawarn "Remove: ${remove[*]}"
+ fi
+ cd - >/dev/null || die
+ fi
}
src_prepare() {
@@ -95,8 +178,13 @@ src_prepare() {
# disable use of SDK on OSX, bug #568758
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
- # User patches + QA
- cmake-utils_src_prepare
+ # Update config.guess to support more systems
+ cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
+
+ # Verify that the live ebuild is up-to-date
+ check_live_ebuild
+
+ llvm.org_src_prepare
}
# Is LLVM being linked against libc++?
@@ -111,6 +199,127 @@ is_libcxx_linked() {
[[ ${out} == *HAVE_LIBCXX* ]]
}
+get_distribution_components() {
+ local sep=${1-;}
+
+ local out=(
+ # shared libs
+ LLVM
+ LTO
+ Remarks
+
+ # tools
+ llvm-config
+
+ # common stuff
+ cmake-exports
+ llvm-headers
+
+ # libraries needed for clang-tblgen
+ LLVMDemangle
+ LLVMSupport
+ LLVMTableGen
+ )
+
+ if multilib_is_native_abi; then
+ out+=(
+ # utilities
+ llvm-tblgen
+ FileCheck
+ llvm-PerfectShuffle
+ count
+ not
+ yaml-bench
+
+ # tools
+ bugpoint
+ dsymutil
+ llc
+ lli
+ lli-child-target
+ llvm-addr2line
+ llvm-ar
+ llvm-as
+ llvm-bcanalyzer
+ llvm-c-test
+ llvm-cat
+ llvm-cfi-verify
+ llvm-config
+ llvm-cov
+ llvm-cvtres
+ llvm-cxxdump
+ llvm-cxxfilt
+ llvm-cxxmap
+ llvm-diff
+ llvm-dis
+ llvm-dlltool
+ llvm-dwarfdump
+ llvm-dwp
+ llvm-elfabi
+ llvm-exegesis
+ llvm-extract
+ llvm-gsymutil
+ llvm-ifs
+ llvm-install-name-tool
+ llvm-jitlink
+ llvm-lib
+ llvm-libtool-darwin
+ llvm-link
+ llvm-lipo
+ llvm-lto
+ llvm-lto2
+ llvm-mc
+ llvm-mca
+ llvm-ml
+ llvm-modextract
+ llvm-mt
+ llvm-nm
+ llvm-objcopy
+ llvm-objdump
+ llvm-opt-report
+ llvm-pdbutil
+ llvm-profdata
+ llvm-ranlib
+ llvm-rc
+ llvm-readelf
+ llvm-readobj
+ llvm-reduce
+ llvm-rtdyld
+ llvm-size
+ llvm-split
+ llvm-stress
+ llvm-strings
+ llvm-strip
+ llvm-symbolizer
+ llvm-undname
+ llvm-xray
+ obj2yaml
+ opt
+ sancov
+ sanstats
+ verify-uselistorder
+ yaml2obj
+
+ # python modules
+ opt-viewer
+
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ use doc && out+=(
+ docs-llvm-html
+ )
+
+ use gold && out+=(
+ LLVMgold
+ )
+ fi
+
+ printf "%s${sep}" "${out[@]}"
+}
+
multilib_src_configure() {
local ffi_cflags ffi_ldflags
if use libffi; then
@@ -126,8 +335,15 @@ multilib_src_configure() {
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
-DLLVM_LIBDIR_SUFFIX=${libdir#lib}
- -DBUILD_SHARED_LIBS=ON
- -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+ -DBUILD_SHARED_LIBS=OFF
+ -DLLVM_BUILD_LLVM_DYLIB=ON
+ -DLLVM_LINK_LLVM_DYLIB=ON
+ -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+
+ # cheap hack: LLVM combines both anyway, and the only difference
+ # is that the former list is explicitly verified at cmake time
+ -DLLVM_TARGETS_TO_BUILD=""
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
-DLLVM_BUILD_TESTS=$(usex test)
-DLLVM_ENABLE_FFI=$(usex libffi)
@@ -138,8 +354,7 @@ multilib_src_configure() {
-DLLVM_ENABLE_LIBPFM=$(usex exegesis)
-DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON
-
- -DWITH_POLLY=OFF # TODO
+ -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
-DLLVM_HOST_TRIPLE="${CHOST}"
@@ -170,18 +385,16 @@ multilib_src_configure() {
# fi
use test && mycmakeargs+=(
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
)
if multilib_is_native_abi; then
mycmakeargs+=(
- -DLLVM_BUILD_DOCS=$(usex doc)
+ -DLLVM_BUILD_DOCS=ON
-DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=$(usex doc)
+ -DLLVM_ENABLE_SPHINX=ON
-DLLVM_ENABLE_DOXYGEN=OFF
-DLLVM_INSTALL_UTILS=ON
- )
- use doc && mycmakeargs+=(
-DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
-DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
-DSPHINX_WARNINGS_AS_ERRORS=OFF
@@ -211,13 +424,19 @@ multilib_src_configure() {
local CXXFLAGS="${CXXFLAGS} -mno-bmi"
fi
+ # LLVM can have very high memory consumption while linking,
+ # exhausting the limit on 32-bit linker executable
+ use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
+
# LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake-utils_src_configure
+ cmake_src_configure
+
+ multilib_is_native_abi && check_distribution_components
}
multilib_src_compile() {
- cmake-utils_src_compile
+ cmake_build distribution
pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
pax-mark m "${BUILD_DIR}"/bin/lli
@@ -233,7 +452,7 @@ multilib_src_compile() {
multilib_src_test() {
# respect TMPDIR!
local -x LIT_PRESERVES_TMP=1
- cmake-utils_src_make check
+ cmake_build check
}
src_install() {
@@ -249,15 +468,15 @@ src_install() {
multilib-minimal_src_install
# move wrapped headers back
- mv "${ED%/}"/usr/include "${ED%/}"/usr/lib/llvm/${SLOT}/include || die
+ mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
}
multilib_src_install() {
- cmake-utils_src_install
+ DESTDIR=${D} cmake_build install-distribution
# move headers to /usr/include for wrapping
- rm -rf "${ED%/}"/usr/include || die
- mv "${ED%/}"/usr/lib/llvm/${SLOT}/include "${ED%/}"/usr/include || die
+ rm -rf "${ED}"/usr/include || die
+ mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
}
@@ -272,20 +491,13 @@ multilib_src_install_all() {
LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
_EOF_
- # install pre-generated manpages
- if ! use doc; then
- # (doman does not support custom paths)
- insinto "/usr/lib/llvm/${SLOT}/share/man/man1"
- doins "${WORKDIR}/${P}-manpages/llvm"/*.1
- fi
-
docompress "/usr/lib/llvm/${SLOT}/share/man"
}
pkg_postinst() {
elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT%/}/usr/lib/llvm/${SLOT}/share/opt-viewer"
- elog "To use these scripts, you will need Python 2.7 along with the following"
+ elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
+ elog "To use these scripts, you will need Python along with the following"
elog "packages:"
elog " dev-python/pygments (for opt-viewer)"
elog " dev-python/pyyaml (for all of them)"