summaryrefslogtreecommitdiff
path: root/llvm-core/mlir
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-07-08 03:04:43 -0500
committerroot <root@alpha.trunkmasters.com>2026-07-08 03:04:43 -0500
commit897a58deb079b5691d4424cc15517aea6e422808 (patch)
tree80a1bb0faff7f0506f36a09342191dffd2e1d3bb /llvm-core/mlir
parentcab4bebbee5e50ac2d5275d645904cef772fcc17 (diff)
downloadbaldeagleos-repo-897a58deb079b5691d4424cc15517aea6e422808.tar.gz
baldeagleos-repo-897a58deb079b5691d4424cc15517aea6e422808.tar.xz
baldeagleos-repo-897a58deb079b5691d4424cc15517aea6e422808.zip
Adding metadata
Diffstat (limited to 'llvm-core/mlir')
-rw-r--r--llvm-core/mlir/Manifest1
-rw-r--r--llvm-core/mlir/mlir-23.0.0_pre20260707.ebuild232
2 files changed, 233 insertions, 0 deletions
diff --git a/llvm-core/mlir/Manifest b/llvm-core/mlir/Manifest
index 7d2332f37147..2d8bf8d9a5f7 100644
--- a/llvm-core/mlir/Manifest
+++ b/llvm-core/mlir/Manifest
@@ -2,5 +2,6 @@ DIST llvm-project-21.1.8.src.tar.xz 158958576 BLAKE2B 0d3d4ee920f8e5db50e9815261
DIST llvm-project-21.1.8.src.tar.xz.sig 119 BLAKE2B cffc1825f5778a3e3c128ec3e856ff6ee50687319d621cdf42e895abf67e05cc51cb7493308e2b506ab60dbdbaca7aa75eb9f78d91d42c81f9682a36f4042e9d SHA512 10f58eff58ed6e701d0f123b15e68c82ab8cbdf99b1c86c0d83e3b8553e90ea51055e30327e8e442ded57c8f503e2a2de9ee075e9c28b5ba815a0f8922f8671c
DIST llvm-project-22.1.8.src.tar.xz 167061596 BLAKE2B 092204f62e0f0364a041c737eb2c25fd073cb5689663d6ccd5a9e4e1743d6d80822360d59b64bff7b4d7872a68a79e899bf2f75f384e55c7d313a79243576f03 SHA512 2615b20ba08534f83ab8ecc7b5ba43b5f1dfcf9cdb2534a32fcdbf0ccdd9a008b46276e45ef26ed9377f65b5e4ae89ea798f3863fd034484b5715140f3a7b35c
DIST llvm-project-22.1.8.src.tar.xz.sig 119 BLAKE2B 2ce93472036e68782252991e4a8bdbeeec8706a56022220083a38a42ef18714a7894c41aaa04dc0d03f18601d8bfc1a5a030ed0ef0f0d64a662eae9843a4b362 SHA512 99a457b5b1fb409a5fe72b59ebd4ddae5cade3e5f2493e33b44d4f4b4625f7a1743f80106efb1134668842b15ea3400ce2c29263bec8ff986e05040910125e15
+DIST llvm-project-43ccdbc84774da0ae4cb5131f2245a9633d977b9.tar.gz 276747748 BLAKE2B 874e5d95e8f3a8401ec989f093095be6203fa77c9729ef66981a13cbff91e6937a9925257f051650c820ea82f6ab8c03884a5a3599e2b450bed11b95c54cc440 SHA512 a84e2f97abc92bdf4da8a00cc89f22d28adef44b316f02992708ee2ebb78f0d4ce38254389a1408caa4b0846134af47ca4bccbfe987f014fefe439495bed3848
DIST llvm-project-49de424f45389cb757c3cc8c50daf38d024e2314.tar.gz 275619907 BLAKE2B de59729b44763de1fba07280d09059f3cb716aa1a8de51b8d8fd6e385378facdf5357845ed9f372f4e613fb8d098b75933c0eff290a42a4803a24ba2afe01a86 SHA512 8ea319751d4bbae866deb77710487f492c3f73f5fd853dc1a3373239e17916f2cbead3042b64d72731db6dd83c43b9827f2f671034f48491e3ce86e8863ce195
DIST llvm-project-6d4cd34d861baec5a761d15b81395fbe88f4391b.tar.gz 273781215 BLAKE2B 9ca9896ac0cfcb9449bd0975e16aca725e14ce5a4c3afd859799ef056a0e1341d63fa21b9bfd3ec1bee2a8482c5cecdd59482d373db72f083d399748a2396e15 SHA512 407e7d2ae1df19bf6095a953a1506583de91e203c4d0461b85a87f86d2069f2b23114b65c5c7f0065d9fbbf8d657bec6ef489ba9310b89f0bddab22c86cccb04
diff --git a/llvm-core/mlir/mlir-23.0.0_pre20260707.ebuild b/llvm-core/mlir/mlir-23.0.0_pre20260707.ebuild
new file mode 100644
index 000000000000..b93f132d90ae
--- /dev/null
+++ b/llvm-core/mlir/mlir-23.0.0_pre20260707.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{13..14} )
+inherit cmake llvm.org multilib-minimal python-any-r1
+
+DESCRIPTION="Multi-Level Intermediate Representation (library only)"
+HOMEPAGE="https://mlir.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions"
+SLOT="${LLVM_MAJOR}/${LLVM_SOABI}"
+IUSE="+debug test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ ~llvm-core/llvm-${PV}[debug=,${MULTILIB_USEDEP}]
+"
+RDEPEND="
+ ${DEPEND}
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ llvm-core/llvm:${LLVM_MAJOR}
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )
+"
+
+LLVM_COMPONENTS=( mlir cmake )
+# tablegen tests use *.td files there
+LLVM_TEST_COMPONENTS=( llvm/include )
+llvm.org_set_globals
+
+python_check_deps() {
+ if use test; then
+ python_has_version "dev-python/lit[${PYTHON_USEDEP}]"
+ fi
+}
+
+src_prepare() {
+ llvm.org_src_prepare
+
+ # https://github.com/llvm/llvm-project/issues/120902
+ sed -i -e '/LINK_LIBS/s:PUBLIC:PRIVATE:' \
+ lib/ExecutionEngine/CMakeLists.txt || die
+
+ # this test is completely unpredictable, no clue why
+ rm test/mlir-pdll-lsp-server/view-output.test || die
+}
+
+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
+ # meta-targets
+ mlir-libraries|distribution)
+ continue
+ ;;
+ # dylib
+ MLIR)
+ ;;
+ # installed test libraries
+ MLIRTestAnalysis|MLIRTestDialect|MLIRTestIR)
+ ;;
+ MLIROpenACCTestPasses)
+ ;;
+ # static libraries
+ MLIR*)
+ 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
+}
+
+get_distribution_components() {
+ local sep=${1-;}
+
+ local out=(
+ mlir-cmake-exports
+ mlir-headers
+
+ # the dylib
+ MLIR
+
+ # shared libraries
+ mlir_apfloat_wrappers
+ mlir_arm_runner_utils
+ mlir_arm_sme_abi_stubs
+ mlir_async_runtime
+ mlir_c_runner_utils
+ mlir_float16_utils
+ mlir_runner_utils
+
+ # test libraries required by flang
+ MLIROpenACCTestPasses
+ MLIRTestAnalysis
+ MLIRTestDialect
+ MLIRTestIR
+ )
+
+ if multilib_is_native_abi; then
+ out+=(
+ # tools
+ mlir-linalg-ods-yaml-gen
+ mlir-lsp-server
+ mlir-opt
+ mlir-pdll
+ mlir-pdll-lsp-server
+ mlir-query
+ mlir-reduce
+ mlir-rewrite
+ mlir-runner
+ mlir-tblgen
+ mlir-translate
+ tblgen-lsp-server
+ tblgen-to-irdl
+ )
+ fi
+
+ printf "%s${sep}" "${out[@]}"
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}"
+ -DLLVM_ROOT="${ESYSROOT}/usr/lib/llvm/${LLVM_MAJOR}"
+
+ -DBUILD_SHARED_LIBS=OFF
+ # this controls building libMLIR.so
+ -DLLVM_BUILD_LLVM_DYLIB=ON
+ -DMLIR_BUILD_MLIR_C_DYLIB=OFF
+ -DMLIR_LINK_MLIR_DYLIB=ON
+ -DMLIR_INCLUDE_TESTS=ON
+ -DMLIR_INCLUDE_INTEGRATION_TESTS=OFF
+ -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
+ # this enables installing mlir-tblgen and mlir-pdll
+ -DLLVM_BUILD_UTILS=ON
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+
+ -DLLVM_BUILD_TOOLS=ON
+ # TODO
+ -DMLIR_ENABLE_CUDA_RUNNER=0
+ -DMLIR_ENABLE_ROCM_RUNNER=0
+ -DMLIR_ENABLE_SYCL_RUNNER=0
+ -DMLIR_ENABLE_SPIRV_CPU_RUNNER=0
+ -DMLIR_ENABLE_VULKAN_RUNNER=0
+ -DMLIR_ENABLE_BINDINGS_PYTHON=0
+ -DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF
+ )
+ use test && mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+ cmake_src_configure
+
+ multilib_is_native_abi && check_distribution_components
+}
+
+multilib_src_compile() {
+ cmake_build distribution
+}
+
+multilib_src_test() {
+ local known_xfail=()
+
+ case ${ABI} in
+ arm|ppc|x86)
+ known_xfail+=(
+ # MLIR is full of 64-bit assumptions, sigh
+ # https://github.com/llvm/llvm-project/issues/124541
+ Dialect/Bufferization/Transforms/one-shot-bufferize-pass-statistics.mlir
+ Dialect/LLVMIR/sroa-statistics.mlir
+ Dialect/Linalg/vectorize-tensor-extract.mlir
+ Dialect/MemRef/mem2reg-statistics.mlir
+ Dialect/Tensor/fold-tensor-subset-ops.mlir
+ Dialect/Tensor/tracking-listener.mlir
+ Pass/pipeline-stats-nested.mlir
+ Pass/pipeline-stats.mlir
+ )
+ ;;
+ esac
+
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ local -x LIT_XFAIL="${known_xfail[*]}"
+ LIT_XFAIL=${LIT_XFAIL// /;}
+ cmake_build check-mlir
+}
+
+multilib_src_install() {
+ DESTDIR=${D} cmake_build install-distribution
+}