Re: Can LDC compile to supported legacy LLVM versions?

2019-01-28 Thread Dukc via Digitalmars-d-learn

On Monday, 28 January 2019 at 13:04:08 UTC, Nicholas Wilson wrote:


Do you mean bitcode, LLVM IR or something different? The LDC 
built against a given version of LLVM can link to 
bitcode/compile LLMV IR, of that version.


Bitcode in this case, but I think your following answer applies 
to IR/assembly/binary too.


Lowest LLVM it can be compiled against is 3.9. LDC's releases 
are compiled against 7.0.1, but that doesn't stop you 
downloading a release of the desired LLVM version and compiling 
LDC against that.


All you need is a semi-recent CMake. Just git clone from our 
github and run cmake, you'll need to provide the location of 
the llvm-config binary as LLVM_CONFIG but thats it.


Okay, that answers it. Thank you.




Re: Can LDC compile to supported legacy LLVM versions?

2019-01-28 Thread Nicholas Wilson via Digitalmars-d-learn

On Monday, 28 January 2019 at 11:37:56 UTC, Dukc wrote:
I have recenty updated my LDC to the most recent version 
(1.14). The problem is that it compiles to LLVM code version 
7.0.1, but I need it to compile to LLVM 6.x.x or LLVM 5.x.x. 
The last release note said that LLVM versions from 
3.something.something are supported, but does this mean only 
linking to them, or also compiling to them?


If it can be done, how? Thanks.


Do you mean bitcode, LLVM IR or something different? The LDC 
built against a given version of LLVM can link to bitcode/compile 
LLMV IR, of that version.


Lowest LLVM it can be compiled against is 3.9. LDC's releases are 
compiled against 7.0.1, but that doesn't stop you downloading a 
release of the desired LLVM version and compiling LDC against 
that.


All you need is a semi-recent CMake. Just git clone from our 
github and run cmake, you'll need to provide the location of the 
llvm-config binary as LLVM_CONFIG but thats it.


Can LDC compile to supported legacy LLVM versions?

2019-01-28 Thread Dukc via Digitalmars-d-learn
I have recenty updated my LDC to the most recent version (1.14). 
The problem is that it compiles to LLVM code version 7.0.1, but I 
need it to compile to LLVM 6.x.x or LLVM 5.x.x. The last release 
note said that LLVM versions from 3.something.something are 
supported, but does this mean only linking to them, or also 
compiling to them?


If it can be done, how? Thanks.