Enables llvm-general to be used out-of-the-box with GHCi and TemplateHaskell whenever possible. This requires the LLVM shared library to be available, but only if you use GHCi/TH; regular compiles work as usual. Since cabal dependencies can not specify flags, this also makes llvm-general easier to work with as a dependency.
Requires Cabal-1.22 or newer, otherwise keeps the old behaviour.
Fixes #84, #85.
Ping #197.
Current behaviour
-fshared-llvm=True
executables are linked against the shared library, and required to compile llvm-general
GHCi and TH work
-fshared-llvm=False (default)
executables are statically linked
GHCi and TH fail in strange and mysterious ways, e.g.:
ghc: libLLVMSupport.a: unhandled ELF relocation(RelA) type 42
or
ghc:
lookupSymbol failed in relocateSection (RELOC_GOT)
/usr/local/homebrew/Cellar/llvm35/3.5.1/lib/llvm-3.5/lib/libLLVMSupport.a: unknown symbol `___dso_handle'
or maybe
<no location info>:
ghc: panic! (the 'impossible' happened)
(GHC version 7.10.3 for x86_64-apple-darwin):
Dynamic linker not initialised
Enables llvm-general to be used out-of-the-box with GHCi and TemplateHaskell whenever possible. This requires the LLVM shared library to be available, but only if you use GHCi/TH; regular compiles work as usual. Since cabal dependencies can not specify flags, this also makes llvm-general easier to work with as a dependency.
Requires Cabal-1.22 or newer, otherwise keeps the old behaviour.
Fixes #84, #85. Ping #197.
Current behaviour
-fshared-llvm=True
-fshared-llvm=False
(default)or
or maybe
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
New behaviour
-fshared-llvm=True
-fshared-llvm=False
(default)