diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 6c4586c..818a0dc 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -44,6 +44,12 @@ #include #include +#if HAVE_LLVM >= 0x0209 +#include +#else /* HAVE_LLVM < 0x0209 */ +#include +#endif /* HAVE_LLVM < 0x0209 */ + #include "pipe/p_config.h" #include "util/u_debug.h" @@ -146,6 +152,15 @@ lp_set_target_options(void) * shared object where the gallium driver resides. */ llvm::DisablePrettyStackTrace = true; + +#if HAVE_LLVM >= 0x0301 + std::string Triple = llvm::sys::getDefaultTargetTriple(); +#else + std::string Triple = llvm::sys::getHostTriple(); +#endif + + _debug_printf("Triple = %s\n", Triple.c_str()); + }