Skip to content

Commit f087a8c

Browse files
mati865jeremyd2019
authored andcommitted
[Clang][Cygwin] Fix symbol visibility definition (llvm#138118)
Currently building for Cygwin hits this error: ``` In file included from /h/projects/llvm-project/clang/lib/Basic/Attributes.cpp:17: /h/projects/llvm-project/clang/include/clang/Basic/ParsedAttrInfo.h:180:73: error: invalid declarator before ‘;’ token 180 | extern template class CLANG_TEMPLATE_ABI Registry<clang::ParsedAttrInfo>; ``` That's because `CLANG_TEMPLATE_ABI` ends up not being defined. The solution here is to follow MinGW case.
1 parent 75cb386 commit f087a8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/include/clang/Support/Compiler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#define CLANG_EXPORT_TEMPLATE
5151
#endif
5252
#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) || \
53-
defined(__MVS__)
53+
defined(__MVS__) || defined(__CYGWIN__)
5454
#define CLANG_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
5555
#define CLANG_TEMPLATE_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
5656
#define CLANG_EXPORT_TEMPLATE

0 commit comments

Comments
 (0)