On 18/04/16 10:14, Jose Fonseca wrote:
Just use LLVM_HOST_TRIPLE, which is available at least from LLVM 3.3 onwards, and is pretty much what llvm::sys::getProcessTriple() does anyway, --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index a299c8a..f311fe7 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -109,13 +109,13 @@ disassemble(const void* func, std::ostream &buffer) * Initialize all used objects. */ - std::string Triple = llvm::sys::getProcessTriple(); - LLVMDisasmContextRef D = LLVMCreateDisasm(Triple.c_str(), NULL, 0, NULL, NULL); + const char *triple = LLVM_HOST_TRIPLE; + LLVMDisasmContextRef D = LLVMCreateDisasm(triple, NULL, 0, NULL, NULL); char outline[1024]; if (!D) { buffer << "error: could not create disassembler for triple " - << Triple.c_str() << '\n'; + << triple << '\n'; return 0; }
I just noticed that this commit effectively worksaround the issue in https://bugs.freedesktop.org/show_bug.cgi?id=92629 , ie, it's now possible to build Mesa/llvmpipe with Clang, even when LLVM was built with GCC 5.0+.
Jose _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
