diff --git a/easybuild/easyblocks/l/llvm.py b/easybuild/easyblocks/l/llvm.py index db086bd83c9..0e994136a57 100644 --- a/easybuild/easyblocks/l/llvm.py +++ b/easybuild/easyblocks/l/llvm.py @@ -748,6 +748,12 @@ def configure_step(self): else: self.general_opts['LLVM_ENABLE_LIBXML2'] = 'OFF' + libffi_root = get_software_root('libffi') + self.general_opts['LLVM_ENABLE_FFI'] = 'ON' if libffi_root else 'OFF' + if libffi_root: + self.general_opts['FFI_INCLUDE_DIR'] = os.path.join(libffi_root, 'include') + self.general_opts['FFI_LIBRARY_DIR'] = os.path.join(libffi_root, 'lib64') + # If 'ON', risk finding a system zlib or zstd leading to including /usr/include as -isystem that can lead # to errors during compilation of 'offload.tools.kernelreplay' due to the inclusion of LLVMSupport (19.x) self.general_opts['LLVM_ENABLE_ZLIB'] = 'ON' if get_software_root('zlib') else 'OFF'