File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,11 @@ if(ENABLE_SHARED)
166
166
set_target_properties (libclang
167
167
PROPERTIES
168
168
VERSION ${LIBCLANG_LIBRARY_VERSION}
169
- DEFINE_SYMBOL _CINDEX_LIB_ DEFINE_SYMBOL CLANG_EXPORTS )
169
+ DEFINE_SYMBOL _CINDEX_LIB_ )
170
+ # Avoid declaring clang c++ symbols that are statically linked into libclang as dllimport'ed.
171
+ # If llvm/libclang-cpp dll is also being built for windows clang c++ symbols will still be
172
+ # implicitly be exported from libclang.
173
+ target_compile_definitions (libclang PRIVATE CLANG_BUILD_STATIC )
170
174
elseif (APPLE )
171
175
set (LIBCLANG_LINK_FLAGS " -Wl,-compatibility_version -Wl,1" )
172
176
set (LIBCLANG_LINK_FLAGS "${LIBCLANG_LINK_FLAGS} -Wl,-current_version -Wl,${LLVM_VERSION_MAJOR} .${LLVM_VERSION_MINOR} .${LLVM_VERSION_PATCH} " )
You can’t perform that action at this time.
0 commit comments