r199799 - [CMake][MS] libclang: Invalidate LLVM_EXPORTED_SYMBOL_FILE to suppress LNK4197.
NAKAMURA Takumi
geek4civic at gmail.com
Wed Jan 22 05:02:59 PST 2014
Author: chapuni
Date: Wed Jan 22 07:02:59 2014
New Revision: 199799
URL: http://llvm.org/viewvc/llvm-project?rev=199799&view=rev
Log:
[CMake][MS] libclang: Invalidate LLVM_EXPORTED_SYMBOL_FILE to suppress LNK4197.
Each functions is exported as "dllexport" in include/clang-c.
See also KB835326.
Modified:
cfe/trunk/tools/libclang/CMakeLists.txt
Modified: cfe/trunk/tools/libclang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=199799&r1=199798&r2=199799&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CMakeLists.txt (original)
+++ cfe/trunk/tools/libclang/CMakeLists.txt Wed Jan 22 07:02:59 2014
@@ -65,6 +65,13 @@ set(GENERATED_HEADERS
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/libclang.exports)
+if(MSVC)
+ # Avoid LNK4197 not to spceify libclang.def here.
+ # Each functions is exported as "dllexport" in include/clang-c.
+ # KB835326
+ set(LLVM_EXPORTED_SYMBOL_FILE)
+endif()
+
if( LLVM_ENABLE_PIC )
set(SHARED_LIBRARY TRUE)
add_clang_library(libclang ${SOURCES})
More information about the cfe-commits
mailing list