diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2013-12-29 23:14:26 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2013-12-29 23:14:26 +0000 |
| commit | 216436c77a9e214276f94c6ec613db4f39b65817 (patch) | |
| tree | e7e8026399e568e208b381cd7bb9e6d0ea8c9419 | |
| parent | 8ea758254637812c327dbf27155abf3924fd0dd7 (diff) | |
| download | bcm5719-llvm-216436c77a9e214276f94c6ec613db4f39b65817.tar.gz bcm5719-llvm-216436c77a9e214276f94c6ec613db4f39b65817.zip | |
[cmake] Set in LLVM_EXPORTED_SYMBOL_FILE PrintFunctionNames/CMakeLists.txt.
The corresponding Makefile sets it too. Also tweak add_clang_library to support
LLVM_EXPORTED_SYMBOL_FILE for modules.
llvm-svn: 198185
| -rw-r--r-- | clang/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | clang/examples/PrintFunctionNames/CMakeLists.txt | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index cb768a47614..18e472f3017 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -313,7 +313,7 @@ macro(add_clang_library name) target_link_libraries( ${name} ${LLVM_COMMON_LIBS} ) link_system_libs( ${name} ) - if (SHARED_LIBRARY AND LLVM_EXPORTED_SYMBOL_FILE) + if ((SHARED_LIBRARY OR MODULE) AND LLVM_EXPORTED_SYMBOL_FILE) add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} ) endif() diff --git a/clang/examples/PrintFunctionNames/CMakeLists.txt b/clang/examples/PrintFunctionNames/CMakeLists.txt index 492b580c0ea..95f1b6b25a6 100644 --- a/clang/examples/PrintFunctionNames/CMakeLists.txt +++ b/clang/examples/PrintFunctionNames/CMakeLists.txt @@ -4,6 +4,14 @@ set( LLVM_LINK_COMPONENTS Support ) +# If we don't need RTTI or EH, there's no reason to export anything +# from the hello plugin. +if( NOT LLVM_REQUIRES_RTTI ) + if( NOT LLVM_REQUIRES_EH ) + set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/PrintFunctionNames.exports) + endif() +endif() + add_clang_library(PrintFunctionNames PrintFunctionNames.cpp) add_dependencies(PrintFunctionNames |

