[SAoC] MLIR Support for LDC

Stefanos Baziotis sdi1600105 at di.uoa.gr
Fri Oct 4 17:37:23 UTC 2019


On Friday, 4 October 2019 at 14:55:08 UTC, Johan Engelen wrote:
> On Friday, 4 October 2019 at 13:07:56 UTC, Roberto Rosmaninho 
> wrote:
>> On Thursday, 3 October 2019 at 18:38:35 UTC, Johan wrote:
>>
>> I see, but neither clang nor compiler-rt has any code in 
>> "${LLVM_ROOT_DIR}/include/".  I think the problem here is that 
>> ${LLVM_ROOT_DIR} has the following path 
>> "~/llvm-project/llvm/build" (at least this is the path that I 
>> got here - this llvm-project is the new pattern), so to get 
>> separate projects like clang, compiler-rt , and mlir, we need 
>> to go back to llvm directory, enter the project directory and 
>> select the project we want. As far as I know, this is the 
>> build pattern for llvm, so anyone who has already installed 
>> mlir will benefit from it.
>
> You should "install" the LLVM that you build yourself, e.g. by 
> make install or ninja install. And then point LDC to that 
> installation of LLVM instead of to the build dir. LLVM_ROOT_DIR 
> should point to the installation dir, not to your build dir. 
> That is the expected setup when building LDC. Can you try that?
>
> -Johan

I'd like to point out that that the wiki [1] seems confuse people.
If one follows the standard procedure described (the one I had 
initially
followed and that Roberto followed if I understood correctly),
the instructions make the user not install LLVM. Then, it makes 
them
install LDC using a temporary location of LLVM (check especially
the highlighted snippets). That in turn seems to cause problems.

Should we change that ?

[1] https://wiki.dlang.org/Building_LDC_from_source


More information about the Digitalmars-d mailing list