From 9a0ea3cead836e3cdd7e45ea8eb13d6529dc1758 Mon Sep 17 00:00:00 2001 From: "logan.riggs@gmail.com" Date: Fri, 30 Jan 2026 20:02:47 +0000 Subject: [PATCH] GH-49087 [CI][Packaging][Gandiva] Some of our Linux packaging jobs fail compiling Gandiva --- cpp/src/gandiva/engine.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/src/gandiva/engine.cc b/cpp/src/gandiva/engine.cc index 496722b1ea8..cc10eb352db 100644 --- a/cpp/src/gandiva/engine.cc +++ b/cpp/src/gandiva/engine.cc @@ -230,7 +230,11 @@ Result> BuildJIT( #endif jit_builder.setJITTargetMachineBuilder(std::move(jtmb)); +#if LLVM_VERSION_MAJOR >= 16 jit_builder.setDataLayout(std::make_optional(data_layout)); +#else + jit_builder.setDataLayout(llvm::Optional(data_layout)); +#endif if (object_cache.has_value()) { jit_builder.setCompileFunctionCreator(