-
Notifications
You must be signed in to change notification settings - Fork 42
Support for llvm 20 #340
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
base: master
Are you sure you want to change the base?
Support for llvm 20 #340
Conversation
Moving to draft since I need to fix CI as well. |
llvm_map_components_to_libnames(llvm_libs support core irreader bitreader bitwriter) | ||
find_package(Clang CONFIG REQUIRED) | ||
|
||
find_package(MLIR 20 CONFIG REQUIRED) |
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.
Does Rellic need MLIR?
include(FetchContent) | ||
FetchContent_Declare(cpp-httplib | ||
GIT_REPOSITORY https://github.com/yhirose/cpp-httplib.git | ||
GIT_TAG v0.20.0 | ||
) | ||
FetchContent_MakeAvailable(cpp-httplib) | ||
set(CPP_HTTPLIB_INCLUDE_DIRS "${cpp-httplib_SOURCE_DIR}") | ||
|
||
find_path(CPP_HTTPLIB_INCLUDE_DIRS "httplib.h") | ||
target_include_directories(${RELLIC_XREF} PRIVATE ${CPP_HTTPLIB_INCLUDE_DIRS}) | ||
|
||
target_link_libraries(${RELLIC_XREF} | ||
PRIVATE | ||
"${PROJECT_NAME}_cxx_settings" | ||
"${PROJECT_NAME}" | ||
gflags::gflags | ||
gflags | ||
) |
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.
IMO this should be gated behind an option like
option(RELLIC_FIND_ALL_EXTERNAL_DEPENDENCIES "Use find_package for ALL dependencies" OFF)
in cmake/options.cmake
. At least let the user choose to provide their own cpp-httplib, even if it's untested by default. Most users won't care, which is fine, and it'll do the right thing because it's OFF
by default.
Also, we should use the target httplib::httplib
instead of CPP_HTTPLIB_INCLUDE_DIRS
.
@@ -20,7 +20,7 @@ target_link_libraries(${RELLIC_DECOMP} | |||
PRIVATE | |||
"${PROJECT_NAME}_cxx_settings" | |||
"${PROJECT_NAME}" | |||
gflags::gflags | |||
gflags |
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.
Why is this changing? gflags provides official support for gflags::gflags
The PR changes support to build with llvm 20 and cmake changes to move away from cxx-common dependency