diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2011-03-12 22:01:47 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2011-03-12 22:01:47 +0000 |
commit | b56130f96b6ca98b0c78caf9f12f3936a4d240a8 (patch) | |
tree | 14de4e58dd98b7d1076dcf7ecf62bc852693e0d4 | |
parent | 255d0253df2e3ef7f52dbeba40ec7ce56077137e (diff) | |
download | external_llvm-b56130f96b6ca98b0c78caf9f12f3936a4d240a8.zip external_llvm-b56130f96b6ca98b0c78caf9f12f3936a4d240a8.tar.gz external_llvm-b56130f96b6ca98b0c78caf9f12f3936a4d240a8.tar.bz2 |
Build EnhancedDisassembly as a shared library too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127555 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/edis/CMakeLists.txt | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/tools/edis/CMakeLists.txt b/tools/edis/CMakeLists.txt index 5037f9f..9406c2a 100644 --- a/tools/edis/CMakeLists.txt +++ b/tools/edis/CMakeLists.txt @@ -1,11 +1,34 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) -add_llvm_library(EnhancedDisassembly +set(SOURCES ../../include/llvm-c/EnhancedDisassembly.h EDMain.cpp -) + ) -set_target_properties(EnhancedDisassembly - PROPERTIES - LINKER_LANGUAGE CXX) +set(LLVM_LINK_COMPONENTS mcdisassembler) +if( LLVM_TARGETS_TO_BUILD MATCHES X86 ) + list(APPEND LLVM_LINK_COMPONENTS x86asmprinter x86disassembler) +endif() +if( LLVM_TARGETS_TO_BUILD MATCHES ARM ) + list(APPEND LLVM_LINK_COMPONENTS armasmprinter armdisassembler) +endif() +# TODO: Process EnhancedDisassembly.exports + +if( NOT WIN32 AND LLVM_ENABLE_PIC ) + set(bsl ${BUILD_SHARED_LIBS}) + set(BUILD_SHARED_LIBS ON) + add_llvm_library(EnhancedDisassembly ${SOURCES}) + set_property(TARGET EnhancedDisassembly PROPERTY + OUTPUT_NAME "EnhancedDisassembly") + set(BUILD_SHARED_LIBS ${bsl}) + set(EnhancedDisassembly_STATIC_TARGET_NAME EnhancedDisassembly_static) +else() + set(EnhancedDisassembly_STATIC_TARGET_NAME EnhancedDisassembly) +endif() + +if( NOT BUILD_SHARED_LIBS ) + add_llvm_library(${EnhancedDisassembly_STATIC_TARGET_NAME} ${SOURCES}) + set_property(TARGET ${EnhancedDisassembly_STATIC_TARGET_NAME} PROPERTY + OUTPUT_NAME "EnhancedDisassembly") +endif() |