]> granicus.if.org Git - clang/commitdiff
[cmake] Set in LLVM_EXPORTED_SYMBOL_FILE PrintFunctionNames/CMakeLists.txt.
authorNico Weber <nicolasweber@gmx.de>
Sun, 29 Dec 2013 23:14:26 +0000 (23:14 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sun, 29 Dec 2013 23:14:26 +0000 (23:14 +0000)
The corresponding Makefile sets it too. Also tweak add_clang_library to support
LLVM_EXPORTED_SYMBOL_FILE for modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198185 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
examples/PrintFunctionNames/CMakeLists.txt

index cb768a4761438d2b157f05eb9bf9e20dcc9efc7d..18e472f3017eb83e2b4f8860524441034393f7b7 100644 (file)
@@ -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()
 
index 492b580c0ea6c344d4614e4f695c16ba7c92b493..95f1b6b25a626e33e0ce7b61c7475947d9a53d13 100644 (file)
@@ -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