Module: Mesa Branch: main Commit: 22fa315ee0622b73956cebf8375497f3ccb8d456 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=22fa315ee0622b73956cebf8375497f3ccb8d456
Author: Karol Herbst <kher...@redhat.com> Date: Tue Jan 9 19:34:05 2024 +0100 clc: use spirv triple starting with llvm-17 It's supported since a while and shouldn't regress anything. Signed-off-by: Karol Herbst <kher...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26955> --- src/compiler/clc/clc_helpers.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/clc/clc_helpers.cpp b/src/compiler/clc/clc_helpers.cpp index 49e4f36000b..93186b5775a 100644 --- a/src/compiler/clc/clc_helpers.cpp +++ b/src/compiler/clc/clc_helpers.cpp @@ -775,7 +775,11 @@ clc_compile_to_llvm_module(LLVMContext &llvm_ctx, &c->getDiagnosticOpts()) }; +#if LLVM_VERSION_MAJOR >= 17 + const char *triple = args->address_bits == 32 ? "spirv-unknown-unknown" : "spirv64-unknown-unknown"; +#else const char *triple = args->address_bits == 32 ? "spir-unknown-unknown" : "spir64-unknown-unknown"; +#endif std::vector<const char *> clang_opts = { args->source.name,