Skip to content

Adding LLVM3.0 specific functions (conditionally compiling removed ones) #29

merged 8 commits into from May 17, 2012

5 participants

scottgw commented Feb 4, 2012

The old version seemed to not work at all with LLVM3.0, it compiled but because functions were removed from the LLVM library at runtime some symbols were not found (such as LLVMBuildUnwind). It will likely be very messy to continue to try to support both pre-3.0 and 3.0 in the same codebase.

For llvm-base: this patch conditionally compiles the removed functions as well as the new ones introduced in LLVM 3.0.

For llvm: comments out the removed functions from llvm-base. I don't know how to conditionally compile them based on whether llvm-base was compiled with 3.0 or < 3.0.

I suggest that llvm-base in the future track directly the LLVM version, without backwards compatibility. Let the interface changes be represented in the llvm-base version numbering, and let the dependent packages (llvm, maybe others) select accordingly. I think this is likely the best policy as otherwise

  1. there is a tangle of conditional compilation, and
  2. the llvm-base version number is a lie anyway: eg, unwind is both available and unavailable within the same version: ruh-oh.
scottgw added some commits Jul 21, 2011
@scottgw scottgw Adding initial shared library support. 5a73333
@scottgw scottgw Merge remote-tracking branch 'upstream/master' ef9f0f8
@scottgw scottgw Adding struct as a FunctionArg instance
Export StructFields from Core/Types so it can be used in CodeGen.
@scottgw scottgw Remove DatatypeContexts, as advised by a warning. eb03ce3
@scottgw scottgw LowerSetJmp was removed as a pass from LLVM 3.0 769aa4e
@scottgw scottgw Initial pass at updating to LLVM 3.0.
Had to remove quite a few functions, not sure how severe it is yet.
The type functions have changed, the new type functions have not yet
been added.
@scottgw scottgw Merge git://
@scottgw scottgw Adding LLVM3.0 functions to Core.hsc.
This adds the new exception and new type creation functions.
It also conditionally comments out the old removed functions.
ohjames commented on 84160d8 Feb 5, 2012

Installed this with cabal and my code works again against llvm 3.0.


+1 llvm-3.0 works again on my Macbook. Cool

jhance commented Feb 25, 2012

It would be very nice to get this into hackage...

@bos bos merged commit 84160d8 into bos:master May 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.