Cabal-Version: 2.2
Name: llvm-ffi
Version: 13.0.0.0.0.2
License: BSD-3-Clause
License-File: LICENSE
Synopsis: FFI bindings to the LLVM compiler toolkit.
Description:
FFI bindings to the LLVM compiler toolkit.
.
Installation cannot be done fully automatically.
It would require Cabal code that is bound to certain Cabal versions
and is prone to fail.
We give several non-automatic ways
that also allow you to choose a particular LLVM version.
.
First possibility is to point Cabal
to the LLVM installation directories manually.
It is recommended to add options to your global @.cabal/config@:
.
> extra-include-dirs: /usr/lib/llvm-13/include
> extra-lib-dirs: /usr/lib/llvm-13/lib
.
This works for both @v1-build@ and @v2-build@.
The shown paths work for Debian and Ubuntu
using the LLVM repositories at .
You can obtain them with
.
> llvm-config-13 --includedir --libdir
.
You can choose specific LLVM versions per project.
For @v1-builds@ it works like so:
.
> cabal install -fllvm900 --extra-include-dirs=$(llvm-config-9 --includedir) --extra-lib-dirs=$(llvm-config-9 --libdir) yourpackage
.
For Nix-style build you must add some options
to the @cabal.project.local@ file of your LLVM-related project:
.
> package llvm-ffi
> flags: +llvm900
> extra-include-dirs: /usr/lib/llvm-9/include
> extra-lib-dirs: /usr/lib/llvm-9/lib
.
The second way uses @pkg-config@.
You can store above paths permanently in a @pkg-config@ file like @llvm.pc@.
The optimal way would be if LLVM installations or GNU/Linux distributions
would contain such a file, but they don't.
Instead, you may generate it using the @llvm-pkg-config@ package
or write one manually.
Then you run
.
> cabal install -fpkgConfig
.
We try to stay up to date with LLVM releases.
The current version of this package is compatible with LLVM 3.9-13.
Please understand that the package may or may not work
against older LLVM releases.
.
Warning for inplace builds:
Re-configuring the package using, say @-fllvm600@,
and re-buildung it might result in corrupt code.
You must make sure that the stuff in @cbits@ is re-compiled.
Cabal or GHC may forget about that.
You are safe if you run @cabal clean@.
.
Caution: Ugly crashes can occur
if you have configured paths for LLVM version X in @.cabal/config@
and try to build @llvm-ffi@ for a different LLVM version Y.
Counterintuitively, global search paths have higher precedence
than local ones: .
But that does not simply mean
that the local configuration is ignored completely.
Instead the local library file is found,
because its name libLLVM-Y.so is unique,
whereas the include file names clash,
thus the ones from the global include directory are used.
Author: Henning Thielemann, Bryan O'Sullivan, Lennart Augustsson
Maintainer: Henning Thielemann
Homepage: http://haskell.org/haskellwiki/LLVM
Stability: experimental
Category: Compilers/Interpreters, Code Generation
Tested-With: GHC==7.4.2, GHC==7.6.3, GHC==7.8.4
Tested-With: GHC==8.0.2, GHC==8.2.2, GHC==8.4.4
Tested-With: GHC==8.6.5, GHC==8.8.4, GHC==8.10.4
Build-Type: Simple
Source-Repository head
Type: darcs
Location: https://hub.darcs.net/thielema/llvm-ffi/
Source-Repository this
Tag: 13.0
Type: darcs
Location: https://hub.darcs.net/thielema/llvm-ffi/
Library
Build-Depends:
enumset >=0.0.5 && <0.2,
base >= 3 && < 5
Hs-Source-Dirs: src
GHC-Options: -Wall -fwarn-missing-import-lists
Default-Language: Haskell2010
Exposed-Modules:
LLVM.FFI.Analysis
LLVM.FFI.BitReader
LLVM.FFI.BitWriter
LLVM.FFI.Core
LLVM.FFI.Core.Attribute
LLVM.FFI.ExecutionEngine
LLVM.FFI.Support.Host
LLVM.FFI.Target
LLVM.FFI.Transforms.IPO
LLVM.FFI.Transforms.PassManagerBuilder
LLVM.FFI.Transforms.Scalar
LLVM.FFI.Transforms.Vectorize
LLVM.Target.Native
Other-modules:
LLVM.FFI.Base
LLVM.FFI.Version
-- LLVM.Target.ARM
-- LLVM.Target.Hexagon
-- LLVM.Target.MSP430
-- LLVM.Target.Mips
-- LLVM.Target.NVPTX
-- LLVM.Target.PowerPC
-- LLVM.Target.Sparc
-- LLVM.Target.X86
-- LLVM.Target.XCore
LLVM.Raw.Core
Hs-Source-Dirs: src/13
CC-Options: -DHS_LLVM_VERSION=1300
Cxx-Options: -DHS_LLVM_VERSION=1300
CPP-Options: -DHS_LLVM_VERSION=1300
CC-Options: -DHAVE_LLVM_SUPPORT_DYNAMICLIBRARY_H=1