How to compile ghc 7.6.2 with llvm?

Magicloud Magiclouds magicloud.magiclouds at gmail.com
Tue Feb 12 19:13:12 CET 2013


Thank you for the replies. These are what I got, correct me if I am wrong:

If I want to build ghc executables and standard libraries, all I need is to
set perf-llvm.
And set perf-llvm or not does not effect the ability of ghc to use llvm.

Then how to check if the output files (executables, libraries) are
generated by llvm, instead of gcc? In other words, to see if llvm was used
correct.


On Wed, Feb 13, 2013 at 1:09 AM, Brandon Allbery <allbery.b at gmail.com>wrote:

> On Tue, Feb 12, 2013 at 11:41 AM, Magicloud Magiclouds <
> magicloud.magiclouds at gmail.com> wrote:
>
>>   Then I `mv build.mk.sample build.mk`, set "BuildFlavour = perf-llvm",
>> add "GhcWithLlvmCodeGen = YES". Finally `./configure
>> --with-gcc=/usr/bin/llvm-gcc`. Configure output attached.
>>
>>   After make, I tried `inplace/bin/ghc-stage2 –info`, it is still using
>> native code generator. What should I do?
>>
>
> 1. I think --with-gcc= is independent of the llvm code generator.
> 2. Building the llvm codegen does not necessarily make it the *default*
> codegen; I think native remains default.  I don't know if there's a way to
> specify that llvm should be the default code generator.
>
> fwiw, the ghc I have on here does not mention llvm in ghc --info, but ghc
> -fllvm at least tries to work.
>
> --
> brandon s allbery kf8nh                               sine nomine
> associates
> allbery.b at gmail.com
> ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>



-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20130213/ece6a1ac/attachment-0001.htm>


More information about the Glasgow-haskell-users mailing list