r198185 - [cmake] Set in LLVM_EXPORTED_SYMBOL_FILE PrintFunctionNames/CMakeLists.txt.
Nico Weber
nicolasweber at gmx.de
Sun Dec 29 15:14:27 PST 2013
Author: nico
Date: Sun Dec 29 17:14:26 2013
New Revision: 198185
URL: http://llvm.org/viewvc/llvm-project?rev=198185&view=rev
Log:
[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.
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=198185&r1=198184&r2=198185&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Sun Dec 29 17:14:26 2013
@@ -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()
Modified: cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt?rev=198185&r1=198184&r2=198185&view=diff
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt (original)
+++ cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt Sun Dec 29 17:14:26 2013
@@ -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
More information about the cfe-commits
mailing list