[Mesa-dev] [PATCH] libclc: Fix libclc build for LLVM 3.3

Tom Stellard tom at stellard.net
Fri Mar 8 07:49:52 PST 2013


On Fri, Mar 08, 2013 at 09:11:48AM -0600, Aaron Watry wrote:
> LLVM moved a bunch of IR-related headers for version 3.3.
> 
> This fixes the libclc build to follow suit.
> 

A fix for this has been sitting on the libclc mailing list for a weeks.
I will try to update my branch.

-Tom

> ---
>  utils/prepare-builtins.cpp |   12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/utils/prepare-builtins.cpp b/utils/prepare-builtins.cpp
> index ae7731b..0141484 100644
> --- a/utils/prepare-builtins.cpp
> +++ b/utils/prepare-builtins.cpp
> @@ -1,9 +1,21 @@
>  #include "llvm/ADT/OwningPtr.h"
>  #include "llvm/Bitcode/ReaderWriter.h"
> +
> +#ifndef HAVE_LLVM
> +#include "llvm/Config/config.h"
> +#define HAVE_LLVM ((LLVM_VERSION_MAJOR << 8)|LLVM_VERSION_MINOR)
> +#endif
> +#if HAVE_LLVM < 0x0303
>  #include "llvm/Function.h"
>  #include "llvm/GlobalVariable.h"
>  #include "llvm/LLVMContext.h"
>  #include "llvm/Module.h"
> +#else
> +#include "llvm/IR/Function.h"
> +#include "llvm/IR/GlobalVariable.h"
> +#include "llvm/IR/LLVMContext.h"
> +#include "llvm/IR/Module.h"
> +#endif
>  #include "llvm/Support/CommandLine.h"
>  #include "llvm/Support/ManagedStatic.h"
>  #include "llvm/Support/MemoryBuffer.h"
> --
> 1.7.10.4

> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list