Compiling a cabal project with LLVM on GHC 7.10 RC1

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

I've tried:

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

  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- --make -O2 -fllvm   Main.hs
  [1 of 1] Compiling Main             ( Main.hs, Main.o )
  Linking Main ...


More information about the Glasgow-haskell-users mailing list