Skip to content

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Support for llvm 20 #340

wants to merge 2 commits into from

Conversation

kumarak
Copy link
Contributor

@kumarak kumarak commented May 16, 2025

The PR changes support to build with llvm 20 and cmake changes to move away from cxx-common dependency

@kumarak kumarak requested a review from frabert as a code owner May 16, 2025 20:14
@kumarak
Copy link
Contributor Author

kumarak commented May 16, 2025

Moving to draft since I need to fix CI as well.

@kumarak kumarak marked this pull request as draft May 16, 2025 20:15
llvm_map_components_to_libnames(llvm_libs support core irreader bitreader bitwriter)
find_package(Clang CONFIG REQUIRED)

find_package(MLIR 20 CONFIG REQUIRED)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Rellic need MLIR?

Comment on lines +60 to 76
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
)
Copy link
Contributor

@ekilmer ekilmer May 23, 2025

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants