commit:     adec6f96d8cc3a08ccef5ca4325ba9ce942b5256
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 23 02:44:32 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Mar 23 02:44:32 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=adec6f96

llvm-core/clang-runtime: Add USE=polly to 20.1.1

Closes: https://bugs.gentoo.org/715612
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-core/clang-runtime/clang-runtime-20.1.1.ebuild | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/llvm-core/clang-runtime/clang-runtime-20.1.1.ebuild 
b/llvm-core/clang-runtime/clang-runtime-20.1.1.ebuild
index 2168a04b6406..b60f249215d0 100644
--- a/llvm-core/clang-runtime/clang-runtime-20.1.1.ebuild
+++ b/llvm-core/clang-runtime/clang-runtime-20.1.1.ebuild
@@ -14,7 +14,7 @@ SLOT="${PV%%.*}"
 KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 
~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos"
 IUSE="
        +compiler-rt libcxx offload openmp +sanitize
-       default-compiler-rt default-libcxx default-lld llvm-libunwind
+       default-compiler-rt default-libcxx default-lld llvm-libunwind polly
 "
 REQUIRED_USE="
        sanitize? ( compiler-rt )
@@ -46,6 +46,7 @@ RDEPEND="
        !default-libcxx? ( sys-devel/gcc )
        default-lld? ( ~llvm-core/lld-${PV} )
        !default-lld? ( sys-devel/binutils )
+       polly? ( ~llvm-core/polly-${PV} )
 "
 
 _doclang_cfg() {
@@ -119,6 +120,12 @@ src_install() {
        newins - gentoo-plugins.cfg <<-EOF
                # This file is used to load optional LLVM plugins.
        EOF
+       if use polly; then
+               cat >> "${ED}/etc/clang/${SLOT}/gentoo-plugins.cfg" <<-EOF || 
die
+                       -fpass-plugin=LLVMPolly.so
+                       -fplugin=LLVMPolly.so
+               EOF
+       fi
 
        multilib_foreach_abi doclang_cfg
 }

Reply via email to