Skip to content

Commit 122afae

Browse files
authored
[libclang][Cygwin] Use __declspec(dllexport) for libclang on Cygwin (#147122)
This is needed for Cygwin build without `-DLLVM_LINK_LLVM_DYLIB=ON`, otherwise causes a linker error 'export ordinal too large'.
1 parent 968410f commit 122afae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/include/clang-c/Platform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LLVM_CLANG_C_EXTERN_C_BEGIN
2222
#ifndef CINDEX_NO_EXPORTS
2323
#define CINDEX_EXPORTS
2424
#endif
25-
#ifdef _WIN32
25+
#if defined(_WIN32) || defined(__CYGWIN__)
2626
#ifdef CINDEX_EXPORTS
2727
#ifdef _CINDEX_LIB_
2828
#define CINDEX_LINKAGE __declspec(dllexport)

0 commit comments

Comments
 (0)