[llvm] [llvm] Pass FFI CMake options through to runtimes (for offload) (PR #118807)

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 06:01:23 PST 2024


https://github.com/mgorny created https://github.com/llvm/llvm-project/pull/118807

Pass the FFI-related CMake options through to runtimes, since offload is building against libffi.  This is needed when the system requires custom `LIBFFI_INCLUDE` to build (e.g. on Gentoo where the headers are installed to `/usr/lib*/libffi/include`).

(this one's for non-standalone builds)

>From 4ad8b2640eaa732da1a4c2429bcac26df3fe943f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny at gentoo.org>
Date: Thu, 5 Dec 2024 14:58:28 +0100
Subject: [PATCH] [llvm] Pass FFI CMake options through to runtimes (for
 offload)

Pass the FFI-related CMake options through to runtimes, since offload
is building against libffi.  This is needed when the system requires
custom `LIBFFI_INCLUDE` to build (e.g. on Gentoo where the headers
are installed to `/usr/lib*/libffi/include`).
---
 llvm/runtimes/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 40fdb14e813332..70e85c123e4127 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -277,6 +277,7 @@ function(runtime_default_target)
                            PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES
                                                 LLVM_USE_LINKER
                                                 CUDA # For runtimes that may look for the CUDA SDK (libc, offload)
+                                                FFI # offload uses libffi
                                                 ${ARG_PREFIXES}
                            EXTRA_TARGETS ${extra_targets}
                                          ${test_targets}



More information about the llvm-commits mailing list