From 4a688750e543a93961b55b2914eacb27000ae2e6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 30 Dec 2021 20:41:13 +0100 Subject: [PATCH] Build & ship mlir too --- debian/changelog | 6 +++ debian/control | 48 +++++++++++++++++++++ debian/libmlir-X.Y-dev.install.in | 7 +++ debian/libmlir-X.Y-dev.lintian-overrides.in | 1 + debian/libmlir-X.Y.install.in | 2 + debian/libmlir-X.Y.lintian-overrides.in | 1 + debian/mlir-X.Y-tools.install.in | 2 + debian/rules | 5 ++- 8 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 debian/libmlir-X.Y-dev.install.in create mode 100644 debian/libmlir-X.Y-dev.lintian-overrides.in create mode 100644 debian/libmlir-X.Y.install.in create mode 100644 debian/libmlir-X.Y.lintian-overrides.in create mode 100644 debian/mlir-X.Y-tools.install.in diff --git a/debian/changelog b/debian/changelog index aae32435..f1060385 100644 --- a/debian/changelog +++ b/debian/changelog @@ -264,6 +264,12 @@ llvm-toolchain-snapshot (1:14~++20210715093511+afc760ef3527-1~exp2) unstable; ur -- Sylvestre Ledru Fri, 06 Aug 2021 08:40:58 +0200 +llvm-toolchain-13 (1:13.0.1~+rc1-1~exp3) experimental; urgency=medium + + * Build & ship mlir too + + -- Sylvestre Ledru Thu, 30 Dec 2021 12:04:43 +0100 + llvm-toolchain-13 (1:13.0.1~+rc1-1~exp2) experimental; urgency=medium * Bring back the dependency clang => llvm-13-linker-tools diff --git a/debian/control b/debian/control index 7a5ab4f5..a64859c7 100644 --- a/debian/control +++ b/debian/control @@ -754,3 +754,51 @@ Description: production-quality unwinder The low level libunwind API was designed to work either in-process (aka local) or to operate on another process (aka remote), but only the local path has been implemented. Remote unwinding remains as future work. + +# ------------- mlir ------------- + +Package: mlir-13-tools +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Multi-Level Intermediate Representation tools + Novel approach to building reusable and extensible compiler infrastructure. + MLIR aims to address software fragmentation, improve compilation for + heterogeneous hardware, significantly reduce the cost of building domain + specific compilers, and aid in connecting existing compilers together. + . + This package provides tools. + +Package: libmlir-13 +Section: libs +Architecture: any +Multi-Arch: same +Depends: ${shlibs:Depends}, + ${misc:Depends} +Provides: libmlir-x.y +Conflicts: libmlir-x.y +Replaces: libmlir-x.y +Description: Multi-Level Intermediate Representation library + Novel approach to building reusable and extensible compiler infrastructure. + MLIR aims to address software fragmentation, improve compilation for + heterogeneous hardware, significantly reduce the cost of building domain + specific compilers, and aid in connecting existing compilers together. + + +Package: libmlir-13-dev +Section: libdevel +Architecture: any +Multi-Arch: same +Depends: + ${misc:Depends}, + libmlir-13 (= ${binary:Version}) +Breaks: libmlir-dev +Provides: libmlir-x.y-dev +Conflicts: libmlir-x.y-dev +Replaces: libmlir-dev, libmlir-x.y-dev +Description: Multi-Level Intermediate Representation library + Novel approach to building reusable and extensible compiler infrastructure. + MLIR aims to address software fragmentation, improve compilation for + heterogeneous hardware, significantly reduce the cost of building domain + specific compilers, and aid in connecting existing compilers together. + + diff --git a/debian/libmlir-X.Y-dev.install.in b/debian/libmlir-X.Y-dev.install.in new file mode 100644 index 00000000..078dae7b --- /dev/null +++ b/debian/libmlir-X.Y-dev.install.in @@ -0,0 +1,7 @@ +usr/lib/llvm-@LLVM_VERSION@/include/mlir-c/ +usr/lib/llvm-@LLVM_VERSION@/include/mlir/ +usr/lib/llvm-@LLVM_VERSION@/lib/cmake/mlir/ + +usr/lib/llvm-@LLVM_VERSION@/lib/libMLIR.so +usr/lib/llvm-@LLVM_VERSION@/lib/libMLIR*.a +usr/lib/llvm-@LLVM_VERSION@/lib/libmlir*.so diff --git a/debian/libmlir-X.Y-dev.lintian-overrides.in b/debian/libmlir-X.Y-dev.lintian-overrides.in new file mode 100644 index 00000000..39b7720f --- /dev/null +++ b/debian/libmlir-X.Y-dev.lintian-overrides.in @@ -0,0 +1 @@ +libmlir-@LLVM_VERSION@-dev: arch-dependent-file-not-in-arch-specific-directory usr/lib/llvm-@LLVM_VERSION@/lib/* diff --git a/debian/libmlir-X.Y.install.in b/debian/libmlir-X.Y.install.in new file mode 100644 index 00000000..94175dc8 --- /dev/null +++ b/debian/libmlir-X.Y.install.in @@ -0,0 +1,2 @@ +usr/lib/llvm-@LLVM_VERSION@/lib/libMLIR.so.* +usr/lib/llvm-@LLVM_VERSION@/lib/libmlir*.so.* diff --git a/debian/libmlir-X.Y.lintian-overrides.in b/debian/libmlir-X.Y.lintian-overrides.in new file mode 100644 index 00000000..5161c513 --- /dev/null +++ b/debian/libmlir-X.Y.lintian-overrides.in @@ -0,0 +1 @@ +libmlir-@LLVM_VERSION@: arch-dependent-file-not-in-arch-specific-directory usr/lib/llvm-@LLVM_VERSION@/lib/* diff --git a/debian/mlir-X.Y-tools.install.in b/debian/mlir-X.Y-tools.install.in new file mode 100644 index 00000000..7c89aa74 --- /dev/null +++ b/debian/mlir-X.Y-tools.install.in @@ -0,0 +1,2 @@ +usr/bin/mlir-* +usr/lib/llvm-@LLVM_VERSION@/bin/mlir-* diff --git a/debian/rules b/debian/rules index c847ac2a..3e776153 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f # polly & lldb aren't enabled for every platform -PROJECTS = clang;clang-tools-extra;lld;cross-project-tests +PROJECTS = clang;clang-tools-extra;lld;cross-project-tests;mlir # openmp & libunwind aren't enabled for every platform RUNTIMES = compiler-rt;libcxx;libcxxabi @@ -706,6 +706,9 @@ override_dh_auto_install: # Remove an example - introduced in https://reviews.llvm.org/D61446 rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libBye.a + # should not be installed (mlir) + rm -rf $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/objects-Release/ + cp $(TARGET_BUILD_STAGE2)/bin/clang-query $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin # Only run on executable, not script