aboutsummaryrefslogtreecommitdiff
path: root/mlir/test/Examples
diff options
context:
space:
mode:
authorStella Laurenzo <stellaraccident@gmail.com>2021-10-09 21:16:29 -0700
committerStella Laurenzo <stellaraccident@gmail.com>2021-10-13 18:45:55 -0700
commitfe6d9937b3846debfb2d97a32416064dc6c806e9 (patch)
tree4cc6ba1b406e21389d91ab3e828cd7dcb0f9cd07 /mlir/test/Examples
parentabdb82b237ebf42572c5730a2265bfc98fc8b0c4 (diff)
downloadllvm-fe6d9937b3846debfb2d97a32416064dc6c806e9.zip
llvm-fe6d9937b3846debfb2d97a32416064dc6c806e9.tar.gz
llvm-fe6d9937b3846debfb2d97a32416064dc6c806e9.tar.bz2
[mlir] Ability to build CAPI dylibs from out of tree projects against installed LLVM.
* Incorporates a reworked version of D106419 (which I have closed but has comments on it). * Extends the standalone example to include a minimal CAPI (for registering its dialect) and a test which, from out of tree, creates an aggregate dylib and links a little sample program against it. This will likely only work today in *static* MLIR builds (until the TypeID fiasco is finally put to bed). It should work on all platforms, though (including Windows - albeit I haven't tried this exact incarnation there). * This is the biggest pre-requisite to being able to build out of tree MLIR Python-based projects from an installed MLIR/LLVM. * I am rather nauseated by the CMake shenanigans I had to endure to get this working. The primary complexity, above and beyond the previous patch is because (with no reason given), it is impossible to export target properties that contain generator expressions... because, of course it isn't. In this case, the primary reason we use generator expressions on the individual embedded libraries is to support arbitrary ordering. Since that need doesn't apply to out of tree (which import everything via FindPackage at the outset), we fall back to a more imperative way of doing the same thing if we detect that the target was imported. Gross, but I don't expect it to need a lot of maintenance. * There should be a relatively straight-forward path from here to rebase libMLIR.so on top of this facility and also make it include the CAPI. Differential Revision: https://reviews.llvm.org/D111504
Diffstat (limited to 'mlir/test/Examples')
-rw-r--r--mlir/test/Examples/standalone/test.toy2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/test/Examples/standalone/test.toy b/mlir/test/Examples/standalone/test.toy
index dd22e45..2e5c4cd 100644
--- a/mlir/test/Examples/standalone/test.toy
+++ b/mlir/test/Examples/standalone/test.toy
@@ -1,4 +1,4 @@
# RUN: %cmake %mlir_src_root/examples/standalone -DCMAKE_CXX_COMPILER=%host_cxx -DCMAKE_C_COMPILER=%host_cc -DLLVM_ENABLE_LIBCXX=%enable_libcxx -DMLIR_DIR=%mlir_cmake_dir ; %cmake --build . --target check-standalone | tee %t | FileCheck %s
-# CHECK: Passed: 3
+# CHECK: Passed: 4
# UNSUPPORTED: windows, android