Skip to content

Commit

Permalink
Build prefixer with -fno-rtti
Browse files Browse the repository at this point in the history
Signed-off-by: Ted Poole <tpoole@redhat.com>
  • Loading branch information
tedjpoole committed Aug 4, 2023
1 parent cd6ab00 commit 54be127
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions bssl-compat/prefixer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
project(prefixer)

find_package(LLVM REQUIRED CONFIG)
# https://llvm.org/docs/CMake.html#embedding-llvm-in-your-project

find_package(Clang REQUIRED CONFIG)
find_package(LLVM REQUIRED CONFIG)

add_executable(prefixer prefixer.cpp)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "LLVM_CMAKE_DIR = ${LLVM_CMAKE_DIR}")
message(STATUS "LLVM_INCLUDE_DIRS = ${LLVM_INCLUDE_DIRS}")
message(STATUS "LLVM_LIBRARY_DIRS = ${LLVM_LIBRARY_DIRS}")
message(STATUS "LLVM_ENABLE_EH = ${LLVM_ENABLE_EH}")
message(STATUS "LLVM_ENABLE_RTTI = ${LLVM_ENABLE_RTTI}")
message(STATUS "LLVM_DEFINITIONS = ${LLVM_DEFINITIONS}")
message(STATUS "LLVM_LINK_LLVM_DYLIB = ${LLVM_LINK_LLVM_DYLIB}")


list(APPEND CMAKE_MODULE_PATH ${LLVM_CMAKE_DIR})
include(AddLLVM)


add_executable(prefixer prefixer.cpp)
llvm_update_compile_flags(prefixer)
target_include_directories(prefixer PRIVATE "${LLVM_INCLUDE_DIRS}")
target_link_directories(prefixer PRIVATE "${LLVM_LIBRARY_DIRS}")
target_link_libraries(prefixer PRIVATE clang-cpp LLVM)
target_link_libraries(prefixer PRIVATE clang-cpp)

0 comments on commit 54be127

Please sign in to comment.