Compiling a cabal project with LLVM on GHC 7.10 RC1

Brandon Simmons brandon.m.simmons at gmail.com
Wed Jan 7 20:21:48 UTC 2015


I've tried:

  $ 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 foo-0.3.0.0...
  Preprocessing library foo-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

I don't see anything referencing "PIC" in the output of cabal build
-v. I can build a hello world program, just fine with `ghc --make`:

  $ /usr/local/bin/ghc-7.10.0.20141222 --make -O2 -fllvm   Main.hs
  [1 of 1] Compiling Main             ( Main.hs, Main.o )
  Linking Main ...

Thanks,
Brandon


More information about the Glasgow-haskell-users mailing list