Skip to content

Commit b952d3f

Browse files
committed
[CMake] Add module ABI name prefix to swift-syntax libraries
Add 'Compiler' prefix to ABI names of swift-syntax libraries so that compiler libraries (e.g. sourcekitdInProc) can be used from binaries linking with swift-syntax (e.g. via SwiftPM) #68812 rdar://116951101 (cherry picked from commit 68d52bd)
1 parent fd38fe4 commit b952d3f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,9 @@ if(SWIFT_INCLUDE_TOOLS)
13351335
if(SWIFT_HOST_VARIANT_SDK MATCHES "LINUX|ANDROID|OPENBSD|FREEBSD")
13361336
set(SWIFT_HOST_LIBRARIES_RPATH "$ORIGIN;$ORIGIN/../${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
13371337
endif()
1338+
# Add unique ABI prefix to swift-syntax libraries so that compiler libraries (e.g. sourcekitdInProc)
1339+
# can be used from tools that has its own swift-syntax libraries as SwiftPM dependencies.
1340+
set(SWIFT_MODULE_ABI_NAME_PREFIX "Compiler")
13381341

13391342
file(TO_CMAKE_PATH "${SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE}" swift_syntax_path)
13401343
FetchContent_Declare(SwiftSyntax

0 commit comments

Comments
 (0)