summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-04-06 16:12:19 +0200
committerMichał Górny <mgorny@gentoo.org>2022-04-06 16:12:43 +0200
commitd033a41e9d66ede9d09131cbbcd601621f2256ba (patch)
tree82abefb5106de1b0b1594e73ea1134e73049cdde /sys-devel/clang
parentapp-misc/qcma: Add missing media-video/ffmpeg:= slot op (diff)
downloadgentoo-d033a41e9d66ede9d09131cbbcd601621f2256ba.tar.gz
gentoo-d033a41e9d66ede9d09131cbbcd601621f2256ba.tar.bz2
gentoo-d033a41e9d66ede9d09131cbbcd601621f2256ba.zip
sys-devel/clang: Install clang-tidy headers
The clang-tidy headers are apparently needed to build custom clang-tidy plugins, so install them. Since they aren't needed by anything in ::gentoo at the moment, limit the change to live ebuilds. I'll add it to ~arch when another 14.x revbump or release happens. TODO: split the header targets upstream to make it possible to install only a subset of generally useful headers rather than all the headers used by standard clang-tidy plugins. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-devel/clang')
-rw-r--r--sys-devel/clang/clang-14.0.0.9999.ebuild11
-rw-r--r--sys-devel/clang/clang-15.0.0.9999.ebuild11
2 files changed, 14 insertions, 8 deletions
diff --git a/sys-devel/clang/clang-14.0.0.9999.ebuild b/sys-devel/clang/clang-14.0.0.9999.ebuild
index a30ff8ddf23e..4cb70129b171 100644
--- a/sys-devel/clang/clang-14.0.0.9999.ebuild
+++ b/sys-devel/clang/clang-14.0.0.9999.ebuild
@@ -105,10 +105,6 @@ check_distribution_components() {
clang-libraries|distribution)
continue
;;
- # headers for clang-tidy static library
- clang-tidy-headers)
- continue
- ;;
# tools
clang|clangd|clang-*)
;;
@@ -194,6 +190,7 @@ get_distribution_components() {
clang-query
clang-reorder-fields
clang-tidy
+ clang-tidy-headers
clangd
find-all-symbols
modularize
@@ -350,6 +347,7 @@ src_install() {
# Move runtime headers to /usr/lib/clang, where they belong
mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
# move (remaining) wrapped headers back
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
# Apply CHOST and version suffix to clang tools
@@ -395,6 +393,11 @@ multilib_src_install() {
rm -rf "${ED}"/usr/include || die
mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
+ if multilib_is_native_abi; then
+ # don't wrap clang-tidy headers, the list is too long
+ # (they're fine for non-native ABI but enabling the targets is problematic)
+ mv "${ED}"/usr/include/clang-tidy "${T}/" || die
+ fi
}
multilib_src_install_all() {
diff --git a/sys-devel/clang/clang-15.0.0.9999.ebuild b/sys-devel/clang/clang-15.0.0.9999.ebuild
index a30ff8ddf23e..4cb70129b171 100644
--- a/sys-devel/clang/clang-15.0.0.9999.ebuild
+++ b/sys-devel/clang/clang-15.0.0.9999.ebuild
@@ -105,10 +105,6 @@ check_distribution_components() {
clang-libraries|distribution)
continue
;;
- # headers for clang-tidy static library
- clang-tidy-headers)
- continue
- ;;
# tools
clang|clangd|clang-*)
;;
@@ -194,6 +190,7 @@ get_distribution_components() {
clang-query
clang-reorder-fields
clang-tidy
+ clang-tidy-headers
clangd
find-all-symbols
modularize
@@ -350,6 +347,7 @@ src_install() {
# Move runtime headers to /usr/lib/clang, where they belong
mv "${ED}"/usr/include/clangrt "${ED}"/usr/lib/clang || die
# move (remaining) wrapped headers back
+ mv "${T}"/clang-tidy "${ED}"/usr/include/ || die
mv "${ED}"/usr/include "${ED}"/usr/lib/llvm/${SLOT}/include || die
# Apply CHOST and version suffix to clang tools
@@ -395,6 +393,11 @@ multilib_src_install() {
rm -rf "${ED}"/usr/include || die
mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
mv "${ED}"/usr/lib/llvm/${SLOT}/$(get_libdir)/clang "${ED}"/usr/include/clangrt || die
+ if multilib_is_native_abi; then
+ # don't wrap clang-tidy headers, the list is too long
+ # (they're fine for non-native ABI but enabling the targets is problematic)
+ mv "${ED}"/usr/include/clang-tidy "${T}/" || die
+ fi
}
multilib_src_install_all() {