Skip to content

Commit b06eed1

Browse files
authored
Merge pull request #84124 from compnerd/mirroring
SwiftRemoteMirror: export symbols from the library on Windows
2 parents ab15602 + e7992a6 commit b06eed1

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Runtimes/Core/SwiftRemoteMirror/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
add_library(swiftRemoteMirror
33
SwiftRemoteMirror.cpp)
4+
target_compile_definitions(swiftRemoteMirror PUBLIC
5+
$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:swiftRemoteMirror_STATIC>)
46
target_link_libraries(swiftRemoteMirror PRIVATE
57
swiftRemoteInspection)
68
target_include_directories(swiftRemoteMirror PRIVATE

include/swift/SwiftRemoteMirror/Platform.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,16 @@ extern "C" {
2323
# elif defined(__MACH__)
2424
# define SWIFT_REMOTE_MIRROR_LINKAGE __attribute__((__visibility__("default")))
2525
# else
26-
# if defined(_WINDLL)
27-
# define SWIFT_REMOTE_MIRROR_LINKAGE __declspec(dllexport)
28-
# else
29-
# define SWIFT_REMOTE_MIRROR_LINKAGE
30-
# endif
26+
# define SWIFT_REMOTE_MIRROR_LINKAGE __declspec(dllexport)
3127
# endif
3228
#else
3329
# if defined(__ELF__) || defined(__MACH__) || defined(__WASM__)
3430
# define SWIFT_REMOTE_MIRROR_LINKAGE __attribute__((__visibility__("default")))
3531
# else
36-
# if defined(_WINDLL)
37-
# define SWIFT_REMOTE_MIRROR_LINKAGE __declspec(dllimport)
38-
# else
32+
# if defined(swiftRemoteMirror_STATIC)
3933
# define SWIFT_REMOTE_MIRROR_LINKAGE
34+
# else
35+
# define SWIFT_REMOTE_MIRROR_LINKAGE __declspec(dllimport)
4036
# endif
4137
# endif
4238
#endif

0 commit comments

Comments
 (0)