-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[LLVM][CMake] Add ffi_static target for the FFI static library #78779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary: This patch is an attempt to make the `find_package(FFI)` support in LLVM prefer to use the static library version if present. This is currently an optional library for building `libffi`, and its presence implies that it should likely be used. This patch is an attempt to fix some problems observed with testing programs linked against `libffi` on many different systems that could have conflicting paths. Linking it statically prevents this. If this is not a desirable solution, we could either roll this logic custom, or handling it via a `COMPONENT` or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
With other dependencies, we use dedicated flags, see for example: llvm-project/llvm/CMakeLists.txt Line 541 in 30aa9fb
Inside the llvm-project/llvm/cmake/modules/Findzstd.cmake Lines 21 to 23 in 30aa9fb
|
+1 for a new CMake variable. Many distributions prefer dynamic linking. Linking in For |
Thanks for the pointer, made the change and some example usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applied locally and tested , LGTM
Premerge land patch from Joseph Change-Id: I7dd70621ad9d2f96a07cbdc65ff0f6226c2a41fb
I am not familiar with CMake, but should there be a |
The user can decide which one to use based off of whether or not |
…78779) Summary: This patch is an attempt to make the `find_package(FFI)` support in LLVM prefer to provide the static library version if present. This is currently an optional library for building `libffi`, and its presence implies that it should likely be used. This patch is an attempt to fix some problems observed with testing programs linked against `libffi` on many different systems that could have conflicting paths. Linking it statically prevents this. This patch adds the `ffi_static` target for this library. Change-Id: Ic3748bd220a942dff47467bc199532e37bf92d95
Summary:
This patch is an attempt to make the
find_package(FFI)
support in LLVMprefer to provide the static library version if present. This is currently
an optional library for building
libffi
, and its presence implies thatit should likely be used. This patch is an attempt to fix some problems
observed with testing programs linked against
libffi
on many differentsystems that could have conflicting paths. Linking it statically
prevents this.
This patch adds the
ffi_static
target for this library.