Repository navigation
Conversation
…tin llvm to mlir type translator and add tests for inlineMLIR feature
… declaration in inlinemlir
|
Hello, I've been working on adding MLIR as a dependency to LDC while working on implementing MLIR is now opt-in (LDC_WITH_MLIR defaults to OFF), so regular CI builds are green. The failure only happens with -DLDC_WITH_MLIR=ON and -DLDC_LINK_MANUALLY=OFF. It appears when During a call with @thewilsonator to investigate and fix it, we replaced the target names that we got from MLIR with plain Unfortunately, it still caused errors as follows: It appears some of the dependencies are not linked properly when |
| set(MLIR_LIBS ${MLIR_DIALECTS} ${MLIR_TRANSLATION_LIBS} | ||
| ${MLIR_CONVERSION_LIBS}) | ||
|
|
||
| list(TRANSFORM MLIR_LIBS PREPEND "-l") |
There was a problem hiding this comment.
This is the workaround we tried for linking MLIR with LDC_LINK_MANUALLY=OFF (plain -l flags instead of CMake target names). It makes ldmd2 link, but ldc2 still fails with undefined symbols. Full explanation and linker errors: here
Hmm, do you still have results for the autodetection? As I guess most CI jobs use an LLVM without MLIR anyway, so I'm wondering if it is actually autodetected/available anywhere, so that we can actually CI-test the MLIR stuff in at least one job.
Any transitive-only CMake deps would e.g. not be linked with LDC_LINK_MANUALLY=OFF, and the ordering might not account for dependencies inbetween these libs either (if the Apple linker is order-sensitive; I don't know) - since with Note that I'd be fine with requiring LDC_LINK_MANUALLY=ON for MLIR support for now (and bailing out in CMake accordingly), it's the default mode anyway. |
…ng ldmd2 compiler linker
From what I can see, only the FreeBSD x86_64 job has an LLVM with MLIR. With
Not directly: I found out that On FreeBSD ldc2 builds and the MLIR tests pass too, but some of lit tests are failing with: |
…efineBuildJitRT.cmake by llvm_set_libs macro which tries to call executable
|
I found the root cause, it turns out when we use |
|
It all seem to work on CI jobs with LLVM that is built with MLIR. I will better split this PR into 2 parts 1) Adds CMake changes and revive old MLIR stubs, 2) Adds inlineMLIR feature. |
No description provided.