From: Christoph Egger Date: Wed, 26 Nov 2014 19:32:54 +0000 (+0100) Subject: Clean up LLVM Linking and use LLVM.so X-Git-Tag: v0.1~167 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=0e21ee85aaa334476f73e0f3d5c6ab6b46859c99;p=frida%2Ffrida.git Clean up LLVM Linking and use LLVM.so LLVM.so prevents segfaults when running with an llvmized graphics driver as it avoids linking against LLVM multiple times (and using incompatible versions). --- diff --git a/CMakeLists.txt b/CMakeLists.txt index bd078ad..87bed5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,9 +22,10 @@ if(NOT LLVM_CONFIG) message(FATAL_ERROR "LLVM not found") endif() -execute_process(COMMAND ${LLVM_CONFIG} --cxxflags OUTPUT_VARIABLE LLVM_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) -execute_process(COMMAND ${LLVM_CONFIG} --ldflags OUTPUT_VARIABLE LLVM_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) -execute_process(COMMAND ${LLVM_CONFIG} --libs OUTPUT_VARIABLE LLVM_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND ${LLVM_CONFIG} --cxxflags OUTPUT_VARIABLE LLVM_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND ${LLVM_CONFIG} --ldflags OUTPUT_VARIABLE LLVM_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND ${LLVM_CONFIG} --libs OUTPUT_VARIABLE LLVM_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND ${LLVM_CONFIG} --system-libs OUTPUT_VARIABLE LLVM_SYSTEM_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE) string(REPLACE -O2 '' LLVM_CFLAGS ${LLVM_CFLAGS}) @@ -63,4 +64,4 @@ ADD_DEFINITIONS(${QT_DEFINITIONS}) qt5_use_modules(frida Widgets) INCLUDE_DIRECTORIES("src") -TARGET_LINK_LIBRARIES(frida ${QT_LIBRARIES} ${LLVM_LDFLAGS} ${LLVM_LIBS} ${LOG4CXX_LDFLAGS} ${GUILE_LDFLAGS} -ltinfo -lpthread -ldl) +TARGET_LINK_LIBRARIES(frida ${QT_LIBRARIES} ${LLVM_LDFLAGS} -lLLVM-3.5 ${LLVM_SYSTEM_LIBS} ${LOG4CXX_LDFLAGS} ${GUILE_LDFLAGS})