mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ASTGen/CMake] Link swiftOnoneSupport in "Debug" build
When building the swift compler with "Debug" configuration, modules written in Swift must be linked to swiftOnoneSupport. Explicitly link it as some linker doesn't auto-link it. rdar://162631685
This commit is contained in:
@@ -292,6 +292,9 @@ function(add_pure_swift_host_library name)
|
|||||||
force_target_link_libraries(${name} PUBLIC
|
force_target_link_libraries(${name} PUBLIC
|
||||||
${APSHL_SWIFT_DEPENDENCIES}
|
${APSHL_SWIFT_DEPENDENCIES}
|
||||||
)
|
)
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
target_link_libraries(${name} PUBLIC swiftSwiftOnoneSupport)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(APSHL_EMIT_MODULE)
|
if(APSHL_EMIT_MODULE)
|
||||||
set(module_triple "${SWIFT_HOST_MODULE_TRIPLE}")
|
set(module_triple "${SWIFT_HOST_MODULE_TRIPLE}")
|
||||||
@@ -457,6 +460,9 @@ function(add_pure_swift_host_tool name)
|
|||||||
force_target_link_libraries(${name} PUBLIC
|
force_target_link_libraries(${name} PUBLIC
|
||||||
${APSHT_SWIFT_DEPENDENCIES}
|
${APSHT_SWIFT_DEPENDENCIES}
|
||||||
)
|
)
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
target_link_libraries(${name} PUBLIC swiftSwiftOnoneSupport)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Make sure we can use the host libraries.
|
# Make sure we can use the host libraries.
|
||||||
target_include_directories(${name} PUBLIC
|
target_include_directories(${name} PUBLIC
|
||||||
|
|||||||
Reference in New Issue
Block a user