Skip to content

Commit 7782ee2

Browse files
Gnimucaaronj0
authored andcommitted
Add cross-platform support for cygwin
1 parent 86a9f46 commit 7782ee2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

include/clang/Interpreter/CppInterOp.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@
1616
#include <vector>
1717

1818
// The cross-platform CPPINTEROP_API macro definition
19-
#ifdef _WIN32
20-
#define CPPINTEROP_API __declspec(dllexport)
19+
#if defined _WIN32 || defined __CYGWIN__
20+
#define CPPINTEROP_API __declspec(dllexport)
2121
#else
22-
#define CPPINTEROP_API __attribute__((visibility("default")))
22+
#ifdef __GNUC__
23+
#define CPPINTEROP_API __attribute__((__visibility__("default")))
24+
#else
25+
#define CPPINTEROP_API
26+
#endif
2327
#endif
2428

2529
namespace Cpp {

0 commit comments

Comments
 (0)