llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Tomohiro Kashiwada (kikairoya)

<details>
<summary>Changes</summary>

This is needed for Cygwin build without `-DLLVM_LINK_LLVM_DYLIB=ON`, otherwise 
causes a linker error 'export ordinal too large'.

---
Full diff: https://github.com/llvm/llvm-project/pull/147122.diff


1 Files Affected:

- (modified) clang/include/clang-c/Platform.h (+1-1) 


``````````diff
diff --git a/clang/include/clang-c/Platform.h b/clang/include/clang-c/Platform.h
index 67c1fff8ff783..8d341ddd6f8eb 100644
--- a/clang/include/clang-c/Platform.h
+++ b/clang/include/clang-c/Platform.h
@@ -22,7 +22,7 @@ LLVM_CLANG_C_EXTERN_C_BEGIN
 #ifndef CINDEX_NO_EXPORTS
   #define CINDEX_EXPORTS
 #endif
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
   #ifdef CINDEX_EXPORTS
     #ifdef _CINDEX_LIB_
       #define CINDEX_LINKAGE __declspec(dllexport)

``````````

</details>


https://github.com/llvm/llvm-project/pull/147122
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to