Skip to content

Commit 76a6f87

Browse files
committed
Introduce and use SWIFT_HAVE_LIBEDIT
1 parent 2fffbb1 commit 76a6f87

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ set_property(GLOBAL PROPERTY JOB_POOL_LINK local_jobs)
1313

1414
# First include general CMake utilities.
1515
include(SwiftUtils)
16+
include(CheckSymbolExists)
1617

1718
#
1819
# User-configurable options that control the inclusion and default build
@@ -805,6 +806,8 @@ if(LIBXML2_FOUND)
805806
set(SWIFT_HAVE_LIBXML 1)
806807
endif()
807808

809+
check_symbol_exists(el_wgets "histedit.h" HAVE_UNICODE_LIBEDIT)
810+
808811
if (LLVM_ENABLE_DOXYGEN)
809812
message(STATUS "Doxygen: enabled")
810813
endif()

include/swift/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
include(CheckSymbolExists)
2-
3-
check_symbol_exists(el_wgets "histedit.h" HAVE_UNICODE_LIBEDIT)
4-
51
configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Config.h
62
ESCAPE_QUOTES @ONLY)
73

tools/SourceKit/tools/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ include_directories(
66

77
add_swift_lib_subdirectory(sourcekitd)
88
add_swift_tool_subdirectory(sourcekitd-test)
9-
add_swift_tool_subdirectory(sourcekitd-repl)
9+
if(HAVE_UNICODE_LIBEDIT)
10+
add_swift_tool_subdirectory(sourcekitd-repl)
11+
endif()
1012
add_swift_tool_subdirectory(complete-test)

tools/driver/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ add_swift_host_tool(swift
1212
SWIFT_COMPONENT compiler
1313
)
1414

15-
target_link_libraries(swift edit)
15+
if(HAVE_UNICODE_LIBEDIT)
16+
target_link_libraries(swift edit)
17+
endif()
1618

1719
add_custom_command(TARGET swift POST_BUILD
1820
COMMAND "${CMAKE_COMMAND}" "-E" "create_symlink" "swift" "swiftc"

tools/swift-remoteast-test/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ add_swift_host_tool(swift-remoteast-test
77
)
88

99
set_target_properties(swift-remoteast-test PROPERTIES ENABLE_EXPORTS 1)
10-
target_link_libraries(swift-remoteast-test edit)
10+
if(HAVE_UNICODE_LIBEDIT)
11+
target_link_libraries(swift-remoteast-test edit)
12+
endif()
1113

1214
# If building as part of clang, make sure the headers are installed.
1315
if(NOT SWIFT_BUILT_STANDALONE)

0 commit comments

Comments
 (0)