Skip to content

Commit

Permalink
Add link flag -undefined dynamic_lookup for macOS build (fixes GH-4)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatriceBlin committed Nov 23, 2022
1 parent d2ed338 commit ea3f1e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@ if(NOT LLVM_ENABLE_RTTI)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
endif()

if (APPLE)
set(LINK_FLAGS "-undefined dynamic_lookup")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter")

add_library(LLVMObfuscator SHARED Plugin.cpp)

target_include_directories(LLVMObfuscator PRIVATE ${CMAKE_SOURCE_DIR})
target_include_directories(LLVMObfuscator PRIVATE ${CMAKE_CURRENT_BINARY_DIR})

target_link_libraries(LLVMObfuscator LLVMCore LLVMSupport)
target_link_libraries(LLVMObfuscator LLVMCore LLVMSupport LLVMInterpreter)

option(BUILD_DUMMY "Build dummy plugin" OFF)
if(BUILD_DUMMY)
Expand Down

0 comments on commit ea3f1e9

Please sign in to comment.