Skip to content

Commit 56e1a9b

Browse files
authored
---
yaml --- r: 341499 b: refs/heads/rxwei-patch-1 c: fe3ec0c h: refs/heads/master i: 341497: 4239318 341495: 11192cf
1 parent 6f841a0 commit 56e1a9b

File tree

8 files changed

+18
-83
lines changed

8 files changed

+18
-83
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: 35277b55a956a36e84a43313610272284d99a546
1018+
refs/heads/rxwei-patch-1: fe3ec0c71725c0e20deb6242fb1867e786398b13
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,11 +915,14 @@ else()
915915
find_package(LibXml2)
916916
endif()
917917

918-
if(LLVM_ENABLE_LIBEDIT)
919-
find_package(LibEdit REQUIRED)
920-
else()
921-
find_package(LibEdit)
918+
# You need libedit linked in order to check if you have el_wgets.
919+
cmake_push_check_state()
920+
list(APPEND CMAKE_REQUIRED_LIBRARIES "edit")
921+
check_symbol_exists(el_wgets "histedit.h" HAVE_EL_WGETS)
922+
if(HAVE_EL_WGETS)
923+
set(HAVE_UNICODE_LIBEDIT 1)
922924
endif()
925+
cmake_pop_check_state()
923926

924927
check_symbol_exists(wait4 "sys/wait.h" HAVE_WAIT4)
925928

branches/rxwei-patch-1/cmake/modules/FindLibEdit.cmake

Lines changed: 0 additions & 62 deletions
This file was deleted.

branches/rxwei-patch-1/include/swift/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ if(SWIFT_BUILD_REMOTE_MIRROR)
55
endif()
66

77
if(SWIFT_INCLUDE_TOOLS)
8-
if(libedit_FOUND)
9-
set(HAVE_UNICODE_LIBEDIT TRUE)
10-
endif()
118
configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Config.h
129
ESCAPE_QUOTES @ONLY)
1310
add_subdirectory(Option)

branches/rxwei-patch-1/tools/SourceKit/tools/CMakeLists.txt

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

77
add_swift_lib_subdirectory(sourcekitd)
88
add_swift_tool_subdirectory(sourcekitd-test)
9-
if(libedit_FOUND)
9+
if(HAVE_UNICODE_LIBEDIT)
1010
add_swift_tool_subdirectory(sourcekitd-repl)
1111
endif()
1212
add_swift_tool_subdirectory(complete-test)

branches/rxwei-patch-1/tools/SourceKit/tools/sourcekitd-repl/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
if(libedit_FOUND)
1+
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} edit)
2+
check_symbol_exists(el_wgets "histedit.h" HAVE_UNICODE_LIBEDIT)
3+
4+
if(HAVE_UNICODE_LIBEDIT)
25
if(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY)
36
set(SOURCEKITD_REPL_LINK_LIBS sourcekitdInProc)
47
else()
@@ -7,13 +10,9 @@ if(libedit_FOUND)
710

811
add_sourcekit_executable(sourcekitd-repl
912
sourcekitd-repl.cpp
10-
LINK_LIBS ${SOURCEKITD_REPL_LINK_LIBS}
13+
LINK_LIBS ${SOURCEKITD_REPL_LINK_LIBS} edit
1114
LLVM_LINK_COMPONENTS support coverage lto
1215
)
13-
target_include_directories(sourcekitd-repl PRIVATE
14-
${libedit_INCLUDE_DIRS})
15-
target_link_libraries(sourcekitd-repl PRIVATE
16-
${libedit_LIBRARIES})
1716
if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
1817
target_link_libraries(sourcekitd-repl PRIVATE dispatch BlocksRuntime)
1918
endif()

branches/rxwei-patch-1/tools/driver/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ target_link_libraries(swift
99
PRIVATE
1010
swiftDriver
1111
swiftFrontendTool)
12-
if(libedit_FOUND)
13-
target_link_libraries(swift PRIVATE
14-
${libedit_LIBRARIES})
12+
if(HAVE_UNICODE_LIBEDIT)
13+
target_link_libraries(swift PRIVATE edit)
1514
endif()
1615

1716
swift_create_post_build_symlink(swift

branches/rxwei-patch-1/tools/swift-remoteast-test/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ target_link_libraries(swift-remoteast-test
77
swiftFrontendTool
88
swiftRemoteAST)
99
set_target_properties(swift-remoteast-test PROPERTIES ENABLE_EXPORTS 1)
10-
if(libedit_FOUND)
11-
target_link_libraries(swift-remoteast-test PRIVATE
12-
${libedit_LIBRARIES})
10+
if(HAVE_UNICODE_LIBEDIT)
11+
target_link_libraries(swift-remoteast-test PRIVATE edit)
1312
endif()
1413

1514
# If building as part of clang, make sure the headers are installed.

0 commit comments

Comments
 (0)