Skip to content

cmake: export the libswift target and the LIBSWIFT_BUILD_MODE that the lldb build can see it. #40185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ function(add_libswift name)
# Create a static libswift library containing all module object files.
add_library(${name} STATIC ${all_obj_files})
set_target_properties(${name} PROPERTIES LINKER_LANGUAGE CXX)
set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${name})
endfunction()
macro(add_swift_tool_subdirectory name)
Expand Down
2 changes: 2 additions & 0 deletions cmake/modules/SwiftConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set(SWIFT_LIBRARY_DIR "@SWIFT_LIBRARY_DIRS@")
set(SWIFT_CMAKE_DIR "@SWIFT_CMAKE_DIR@")
set(SWIFT_BINARY_DIR "@SWIFT_BINARY_DIR@")

set(LIBSWIFT_BUILD_MODE "@LIBSWIFT_BUILD_MODE@")

set(CMARK_TARGETS_FILE @SWIFT_PATH_TO_CMARK_BUILD@/src/cmarkTargets.cmake)
if(NOT TARGET libcmark_static AND EXISTS ${CMARK_TARGETS_FILE})
include(${CMARK_TARGETS_FILE})
Expand Down