在GHC 7.10 RC1上使用LLVM编译cabal项目

时间:2015-01-07 02:47:01

标签: haskell llvm ghc cabal cabal-install

我试过了:

$ cabal install --only-dependencies -w /usr/local/bin/ghc-7.10.0.20141222  --enable-tests --enable-benchmarks --ghc-option=-fllvm --ghc-option=-static
$ cabal configure -w /usr/local/bin/ghc-7.10.0.20141222  --enable-tests --enable-benchmarks --ghc-option=-fllvm --ghc-option=-static
$ cabal build   
Building unagi-chan-0.3.0.0...
Preprocessing library unagi-chan-0.3.0.0...

when making flags consistent: Warning:
    Using native code generator rather than LLVM, as LLVM is incompatible with -fPIC and -dynamic on this platform

我在cabal build -v的输出中看不到任何引用“PIC”的内容。

1 个答案:

答案 0 :(得分:2)

我想我需要--disable-shared

cabal configure -w /usr/local/bin/ghc-7.10.0.20141222  --enable-tests --enable-benchmarks --ghc-option=-fllvm --ghc-option=-static --disable-shared