Skip to content

Commit 7e03e76

Browse files
committed
[CMake] Link swiftOnoneSupport in "Debug" build
When building the swift compler with "Debug" configuration, artifacts must be linked to swiftOnoneSupport. Explicitly link it as some linker doesn't auto-link it. rdar://162631685
1 parent cc7888f commit 7e03e76

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/modules/AddSwiftHostLibrary.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ function(add_swift_syntax_library name)
5656

5757
# Create the library target.
5858
add_library(${target} ${ASHL_SOURCES})
59+
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
60+
target_link_libraries(${target} PUBLIC swiftSwiftOnoneSupport)
61+
endif()
5962

6063
if(SWIFTSYNTAX_EMIT_MODULE)
6164
# Determine where Swift modules will be built and installed.

0 commit comments

Comments
 (0)