[Mesa-dev] [PATCH] clover: Fix build with LLVM 3.4

Tom Stellard tom at stellard.net
Fri Jun 28 07:43:52 PDT 2013


On Fri, Jun 28, 2013 at 09:41:45AM -0500, Aaron Watry wrote:
> PathV1.h has been removed. In theory this can go back before llvm 3.4, but I
> haven't done the research to find out how far back.
> 
> Signed-off-by: Aaron Watry <awatry at gmail.com>

I pushed a similar commit yesterday:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e990736f34c43f553d4516bc6ffb8fe521e3806

Is the build still broken even with this commit?

-Tom

> ---
>  src/gallium/state_trackers/clover/llvm/invocation.cpp | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> index 362f02f..ee0249d 100644
> --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
> +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> @@ -43,7 +43,12 @@
>  #include <llvm/PassManager.h>
>  #include <llvm/Support/TargetSelect.h>
>  #include <llvm/Support/MemoryBuffer.h>
> +#if HAVE_LLVM < 0x0304
>  #include <llvm/Support/PathV1.h>
> +#else
> +#include <llvm/ADT/SmallString.h>
> +#include <llvm/Support/Path.h>
> +#endif
>  #include <llvm/Transforms/IPO.h>
>  #include <llvm/Transforms/IPO/PassManagerBuilder.h>
>  
> @@ -222,9 +227,16 @@ namespace {
>  
>        llvm::PassManager PM;
>        llvm::PassManagerBuilder Builder;
> +#if HAVE_LLVM < 0x0304
>        llvm::sys::Path libclc_path =
>                              llvm::sys::Path(LIBCLC_LIBEXECDIR + processor +
>  			                    "-" + triple + ".bc");
> +#else
> +      llvm::SmallString<1> libclc_path;
> +      libclc_path = LIBCLC_LIBEXECDIR;
> +      std::string file_name = processor + "-" + triple + ".bc";
> +      llvm::sys::path::append(libclc_path, file_name);
> +#endif
>  
>        // Link the kernel with libclc
>  #if HAVE_LLVM < 0x0303
> -- 
> 1.8.1.2
> 
> _______________________________________________
> 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