Cabal-Version: 2.2
Name: llvm-ffi
Version: 16.0.0.0.0.1
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-16/include
> extra-lib-dirs: /usr/lib/llvm-16/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-16 --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 8-16.
Please understand that the package may or may not work
against older LLVM releases.
.
Warning for inplace builds:
Re-configuring the package using, say @-fllvm1100@,
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
Extra-Source-Files:
include/support.h
tool/ltrace.config
tool/ltrace.readme
flatpak/llvm-3.8.1.json
flatpak/llvm-3.9.1.json
-- gcc -I/usr/lib/llvm-16/include -I include -MM cbits/support.cpp
include/llvm/ADT/Any.h
include/llvm/ADT/APFloat.h
include/llvm/ADT/APInt.h
include/llvm/ADT/APSInt.h
include/llvm/ADT/ArrayRef.h
include/llvm/ADT/Bitfields.h
include/llvm/ADT/bit.h
include/llvm/ADT/BitmaskEnum.h
include/llvm/ADT/BitVector.h
include/llvm/ADT/DenseMap.h
include/llvm/ADT/DenseMapInfo.h
include/llvm/ADT/DenseSet.h
include/llvm/ADT/EpochTracker.h
include/llvm/ADT/FloatingPointMode.h
include/llvm/ADT/FunctionExtras.h
include/llvm/ADT/GraphTraits.h
include/llvm/ADT/Hashing.h
include/llvm/ADT/identity.h
include/llvm/ADT/ilist_base.h
include/llvm/ADT/ilist.h
include/llvm/ADT/ilist_iterator.h
include/llvm/ADT/ilist_node_base.h
include/llvm/ADT/ilist_node.h
include/llvm/ADT/ilist_node_options.h
include/llvm/ADT/iterator.h
include/llvm/ADT/iterator_range.h
include/llvm/ADT/MapVector.h
include/llvm/ADT/PointerIntPair.h
include/llvm/ADT/PointerUnion.h
include/llvm/ADT/Sequence.h
include/llvm/ADT/simple_ilist.h
include/llvm/ADT/SmallPtrSet.h
include/llvm/ADT/SmallString.h
include/llvm/ADT/SmallVector.h
include/llvm/ADT/STLExtras.h
include/llvm/ADT/STLForwardCompat.h
include/llvm/ADT/STLFunctionalExtras.h
include/llvm/ADT/StringExtras.h
include/llvm/ADT/StringMapEntry.h
include/llvm/ADT/StringMap.h
include/llvm/ADT/StringRef.h
include/llvm/ADT/StringSwitch.h
include/llvm/ADT/TinyPtrVector.h
include/llvm/ADT/Triple.h
include/llvm/ADT/Twine.h
include/llvm-c/Core.h
include/llvm-c/DataTypes.h
include/llvm-c/Deprecated.h
include/llvm-c/Error.h
include/llvm-c/ErrorHandling.h
include/llvm-c/ExecutionEngine.h
include/llvm-c/ExecutionEngine.h
include/llvm-c/ExternC.h
include/llvm/Config/abi-breaking.h
include/llvm/Config/AsmParsers.def
include/llvm/Config/AsmPrinters.def
include/llvm/Config/Disassemblers.def
include/llvm/Config/llvm-config.h
include/llvm/Config/Targets.def
include/llvm-c/Target.h
include/llvm-c/TargetMachine.h
include/llvm-c/Types.h
include/llvm/ExecutionEngine/ExecutionEngine.h
include/llvm/ExecutionEngine/JITSymbol.h
include/llvm/IR/Argument.h
include/llvm/IR/Attributes.h
include/llvm/IR/Attributes.inc
include/llvm/IR/BasicBlock.h
include/llvm/IR/CallingConv.h
include/llvm/IR/CFG.h
include/llvm/IR/Comdat.h
include/llvm/IR/ConstantFolder.h
include/llvm/IR/ConstantFold.h
include/llvm/IR/Constant.h
include/llvm/IR/Constants.h
include/llvm/IR/DataLayout.h
include/llvm/IR/DebugLoc.h
include/llvm/IR/DerivedTypes.h
include/llvm/IR/DiagnosticHandler.h
include/llvm/IR/FixedMetadataKinds.def
include/llvm/IR/FMF.h
include/llvm/IR/FPEnv.h
include/llvm/IR/Function.h
include/llvm/IR/GlobalAlias.h
include/llvm/IR/GlobalIFunc.h
include/llvm/IR/GlobalObject.h
include/llvm/IR/GlobalValue.h
include/llvm/IR/GlobalVariable.h
include/llvm/IR/InstrTypes.h
include/llvm/IR/Instruction.def
include/llvm/IR/Instruction.h
include/llvm/IR/Instructions.h
include/llvm/IR/IntrinsicEnums.inc
include/llvm/IR/Intrinsics.h
include/llvm/IR/IRBuilderFolder.h
include/llvm/IR/IRBuilder.h
include/llvm/IR/LLVMContext.h
include/llvm/IR/Metadata.def
include/llvm/IR/Metadata.h
include/llvm/IR/Module.h
include/llvm/IR/OperandTraits.h
include/llvm/IR/Operator.h
include/llvm/IR/PassInstrumentation.h
include/llvm/IR/PassManager.h
include/llvm/IR/PassManagerInternal.h
include/llvm/IR/ProfileSummary.h
include/llvm/IR/SymbolTableListTraits.h
include/llvm/IR/TrackingMDRef.h
include/llvm/IR/Type.h
include/llvm/IR/Use.h
include/llvm/IR/User.h
include/llvm/IR/Value.def
include/llvm/IR/Value.h
include/llvm/IR/ValueHandle.h
include/llvm/MC/MCTargetOptions.h
include/llvm/Object/Binary.h
include/llvm/Object/Error.h
include/llvm/Support/Alignment.h
include/llvm/Support/AlignOf.h
include/llvm/Support/AllocatorBase.h
include/llvm/Support/Allocator.h
include/llvm/Support/AtomicOrdering.h
include/llvm/Support/Casting.h
include/llvm/Support/CBindingWrapping.h
include/llvm/Support/CodeGen.h
include/llvm/Support/Compiler.h
include/llvm/Support/Compression.h
include/llvm/Support/DataTypes.h
include/llvm/Support/Debug.h
include/llvm/Support/Endian.h
include/llvm/Support/Error.h
include/llvm/Support/ErrorHandling.h
include/llvm/Support/ErrorOr.h
include/llvm/Support/Format.h
include/llvm/Support/Host.h
include/llvm/Support/MathExtras.h
include/llvm/Support/MD5.h
include/llvm/Support/MemAlloc.h
include/llvm/Support/MemoryBuffer.h
include/llvm/Support/MemoryBufferRef.h
include/llvm/Support/Mutex.h
include/llvm/Support/PGOOptions.h
include/llvm/Support/PointerLikeTypeTraits.h
include/llvm/Support/raw_ostream.h
include/llvm/Support/ReverseIteration.h
include/llvm/Support/SwapByteOrder.h
include/llvm/Support/Threading.h
include/llvm/Support/TimeProfiler.h
include/llvm/Support/TrailingObjects.h
include/llvm/Support/TypeName.h
include/llvm/Support/TypeSize.h
include/llvm/Support/type_traits.h
include/llvm/Support/VersionTuple.h
include/llvm/Target/CGPassBuilderOption.h
include/llvm/TargetParser/Host.h
include/llvm/TargetParser/Triple.h
include/llvm/Target/TargetMachine.h
include/llvm/Target/TargetOptions.h
Flag developer
Description: developer mode - warnings let compilation fail
Manual: True
Default: False
Flag buildExamples
Description: Build example executables
Manual: True
Default: False
Flag pkgConfig
Description: use pkgconfig (llvm.pc) instead of extra-libraries
Manual: True
Default: False
Flag specificPkgConfig
Description: use llvm-x.pc instead of llvm.pc
Manual: True
Default: True
Flag llvm309
Description: use LLVM-3.9 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm400
Description: use LLVM-4.0 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm500
Description: use LLVM-5.0 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm600
Description: use LLVM-6.0 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm700
Description: use LLVM-7 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm800
Description: use LLVM-8 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm900
Description: use LLVM-9 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm1000
Description: use LLVM-10 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm1100
Description: use LLVM-11 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm1200
Description: use LLVM-12 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm1300
Description: use LLVM-13 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm1400
Description: use LLVM-14 instead of latest supported LLVM
Manual: True
Default: False
Flag llvm1500
Description: use LLVM-15 instead of latest supported LLVM
Manual: True
Default: False
Source-Repository head
Type: darcs
Location: https://hub.darcs.net/thielema/llvm-ffi/
Source-Repository this
Tag: 16.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
If flag(developer)
GHC-Options: -Werror
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
LLVM.FFI.Core14
If flag(llvm309)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-3.9
Else
PkgConfig-Depends: llvm == 3.9.*
Else
Extra-Libraries: LLVM-3.9
Hs-Source-Dirs: src/3.9, src/before14
CC-Options: -DHS_LLVM_VERSION=309
Cxx-Options: -DHS_LLVM_VERSION=309
CPP-Options: -DHS_LLVM_VERSION=309
Else
If flag(llvm400)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-4.0
Else
PkgConfig-Depends: llvm == 4.0.*
Else
Extra-Libraries: LLVM-4.0
Hs-Source-Dirs: src/4.0, src/before14
CC-Options: -DHS_LLVM_VERSION=400
Cxx-Options: -DHS_LLVM_VERSION=400
CPP-Options: -DHS_LLVM_VERSION=400
Else
If flag(llvm500)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-5.0
Else
PkgConfig-Depends: llvm == 5.0.*
Else
Extra-Libraries: LLVM-5.0
Hs-Source-Dirs: src/5.0, src/before14
CC-Options: -DHS_LLVM_VERSION=500
Cxx-Options: -DHS_LLVM_VERSION=500
CPP-Options: -DHS_LLVM_VERSION=500
Else
If flag(llvm600)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-6.0
Else
PkgConfig-Depends: llvm == 6.0.*
Else
Extra-Libraries: LLVM-6.0
Hs-Source-Dirs: src/6.0, src/before14
CC-Options: -DHS_LLVM_VERSION=600
Cxx-Options: -DHS_LLVM_VERSION=600
CPP-Options: -DHS_LLVM_VERSION=600
Else
If flag(llvm700)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-7
Else
PkgConfig-Depends: llvm == 7.*
Else
Extra-Libraries: LLVM-7
Hs-Source-Dirs: src/7, src/before14
CC-Options: -DHS_LLVM_VERSION=700
Cxx-Options: -DHS_LLVM_VERSION=700
CPP-Options: -DHS_LLVM_VERSION=700
Else
If flag(llvm800)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-8
Else
PkgConfig-Depends: llvm == 8.*
Else
Extra-Libraries: LLVM-8
Hs-Source-Dirs: src/8, src/before14
CC-Options: -DHS_LLVM_VERSION=800
Cxx-Options: -DHS_LLVM_VERSION=800
CPP-Options: -DHS_LLVM_VERSION=800
Else
If flag(llvm900)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-9
Else
PkgConfig-Depends: llvm == 9.*
Else
Extra-Libraries: LLVM-9
Hs-Source-Dirs: src/9, src/before14
CC-Options: -DHS_LLVM_VERSION=900
Cxx-Options: -DHS_LLVM_VERSION=900
CPP-Options: -DHS_LLVM_VERSION=900
Else
-- taken from llvm-config --cxxflags
Cxx-Options: -std=c++14
If flag(llvm1000)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-10
Else
PkgConfig-Depends: llvm == 10.*
Else
Extra-Libraries: LLVM-10
Hs-Source-Dirs: src/10, src/before14
CC-Options: -DHS_LLVM_VERSION=1000
Cxx-Options: -DHS_LLVM_VERSION=1000
CPP-Options: -DHS_LLVM_VERSION=1000
Else
If flag(llvm1100)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-11
Else
PkgConfig-Depends: llvm == 11.*
Else
Extra-Libraries: LLVM-11
Hs-Source-Dirs: src/11, src/before14
CC-Options: -DHS_LLVM_VERSION=1100
Cxx-Options: -DHS_LLVM_VERSION=1100
CPP-Options: -DHS_LLVM_VERSION=1100
Else
If flag(llvm1200)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-12
Else
PkgConfig-Depends: llvm == 12.*
Else
Extra-Libraries: LLVM-12
Hs-Source-Dirs: src/12, src/before14
CC-Options: -DHS_LLVM_VERSION=1200
Cxx-Options: -DHS_LLVM_VERSION=1200
CPP-Options: -DHS_LLVM_VERSION=1200
Else
If flag(llvm1300)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-13
Else
PkgConfig-Depends: llvm == 13.*
Else
Extra-Libraries: LLVM-13
Hs-Source-Dirs: src/13, src/before14
CC-Options: -DHS_LLVM_VERSION=1300
Cxx-Options: -DHS_LLVM_VERSION=1300
CPP-Options: -DHS_LLVM_VERSION=1300
Else
Hs-Source-Dirs: src/from14
If flag(llvm1400)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-14
Else
PkgConfig-Depends: llvm == 14.*
Else
Extra-Libraries: LLVM-14
Hs-Source-Dirs: src/14
CC-Options: -DHS_LLVM_VERSION=1400
Cxx-Options: -DHS_LLVM_VERSION=1400
CPP-Options: -DHS_LLVM_VERSION=1400
Else
If flag(llvm1500)
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-15
Else
PkgConfig-Depends: llvm == 15.*
Else
Extra-Libraries: LLVM-15
Hs-Source-Dirs: src/15
CC-Options: -DHS_LLVM_VERSION=1500
Cxx-Options: -DHS_LLVM_VERSION=1500
CPP-Options: -DHS_LLVM_VERSION=1500
Else
Cxx-Options: -std=c++17
If flag(pkgConfig)
If flag(specificPkgConfig)
PkgConfig-Depends: llvm-16
Else
PkgConfig-Depends: llvm == 16.*
Else
Extra-Libraries: LLVM-16
Hs-Source-Dirs: src/16
CC-Options: -DHS_LLVM_VERSION=1600
Cxx-Options: -DHS_LLVM_VERSION=1600
CPP-Options: -DHS_LLVM_VERSION=1600
CC-Options: -DHAVE_LLVM_SUPPORT_DYNAMICLIBRARY_H=1
CPP-Options: -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
Include-Dirs: include
Extra-Libraries: stdc++
Cxx-Options: -std=c++0x -std=c++11
Cxx-Sources:
cbits/support.cpp
Executable llvm-ffi-host
If flag(buildExamples)
Build-Depends:
llvm-ffi,
utility-ht >=0.0.9 && <0.1,
base
Else
Buildable: False
If flag(developer)
GHC-Options: -Werror
Hs-Source-Dirs: example
GHC-Options: -Wall
Default-Language: Haskell2010
Main-Is: Host.hs
Other-Modules: Common
Executable llvm-ffi-jit
If flag(buildExamples)
Build-Depends:
llvm-ffi,
utility-ht >=0.0.9 && <0.1,
base
Else
Buildable: False
If flag(developer)
GHC-Options: -Werror
Hs-Source-Dirs: example
GHC-Options: -Wall
Default-Language: Haskell2010
Main-Is: JIT.hs
Other-Modules: Common
Executable llvm-ffi-offset
If flag(buildExamples)
Build-Depends:
llvm-ffi,
utility-ht >=0.0.9 && <0.1,
base
Else
Buildable: False
If flag(developer)
GHC-Options: -Werror
Hs-Source-Dirs: example
GHC-Options: -Wall
Default-Language: Haskell2010
Main-Is: Offset.hs
Other-Modules: Common