1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
# Various Swift components require linking against `curses`; Gentoo doesn't use
# `curses` as an alias for `ncurses`, so we have to link against `ncurses`
# explicitly. `ncurses` on Gentoo also doesn't expose the `curses` terminfo
# database interface (e.g., `set_curterm`, `del_curterm`, etc.), so we have to
# also explicitly link against `tinfo`.
--- a/swift/utils/test-clustered-bit-vector/Makefile
+++ b/swift/utils/test-clustered-bit-vector/Makefile
@@ -5,7 +5,7 @@ HEADERS=${SRCROOT}/tools/swift/include/swift/Basic/ClusteredBitVector.h
SOURCES=${SRCROOT}/tools/swift/lib/Basic/ClusteredBitVector.cpp
generator: generator.cpp ${HEADERS} ${SOURCES}
- xcrun clang++ -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lcurses generator.cpp ${SOURCES} -o generator
+ xcrun clang++ -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lncurses -ltinfo generator.cpp ${SOURCES} -o generator
test: test.cpp ${HEADERS} ${SOURCES}
- xcrun clang++ -g -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lcurses test.cpp ${SOURCES} -o test
+ xcrun clang++ -g -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lncurses -ltinfo test.cpp ${SOURCES} -o test
--- a/swift/utils/test-prefix-map/Makefile
+++ b/swift/utils/test-prefix-map/Makefile
@@ -11,7 +11,7 @@ CXXFLAGS = -std=c++11 \
-I$(objroot)/tools/clang/include \
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
-LDFLAGS = -L$(objroot)/lib -lswiftBasic -lLLVMSupport -lcurses
+LDFLAGS = -L$(objroot)/lib -lswiftBasic -lLLVMSupport -lncurses -ltinfo
main: main.cpp $(srcroot)/tools/swift/include/swift/Basic/PrefixMap.h
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o main main.cpp
--- a/swift/utils/test-successor-map/Makefile
+++ b/swift/utils/test-successor-map/Makefile
@@ -11,7 +11,7 @@ CXXFLAGS = -std=c++11 \
-I$(objroot)/tools/clang/include \
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
-LDFLAGS = -L$(objroot)/Debug+Asserts/lib -lLLVMSupport -lcurses
+LDFLAGS = -L$(objroot)/Debug+Asserts/lib -lLLVMSupport -lncurses -ltinfo
main: main.cpp $(srcroot)/tools/swift/include/swift/Basic/SuccessorMap.h
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o main main.cpp
--- a/llbuild/Package.swift
+++ b/llbuild/Package.swift
@@ -31,7 +31,10 @@ let terminfoLibraries: [LinkerSetting] = {
#if os(FreeBSD) || os(OpenBSD)
return [.linkedLibrary("ncurses")]
#else
- return [.linkedLibrary("ncurses", .when(platforms: [.linux, .macOS]))]
+ return [
+ .linkedLibrary("ncurses", .when(platforms: [.linux, .macOS])),
+ .linkedLibrary("tinfo", .when(platforms: [.linux]))
+ ]
#endif
}()
--- a/llbuild/lib/llvm/Support/CMakeLists.txt
+++ b/llbuild/lib/llvm/Support/CMakeLists.txt
@@ -65,7 +65,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|OpenBSD")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Android|Darwin|Linux|FreeBSD")
- target_link_libraries(llvmSupport PRIVATE curses)
+ target_link_libraries(llvmSupport PRIVATE ncurses tinfo)
endif()
set_property(GLOBAL APPEND PROPERTY LLBuild_EXPORTS llvmSupport)
--- a/llbuild/perftests/Xcode/PerfTests/CMakeLists.txt
+++ b/llbuild/perftests/Xcode/PerfTests/CMakeLists.txt
@@ -33,7 +33,8 @@ target_link_libraries(XcodePerfTests PRIVATE
llbuildNinja
llbuildBuildSystem
llbuildCommands
- curses
+ ncurses
+ tinfo
SQLite::SQLite3
"${MACOSX_SDK_PATH}/System/Library/Frameworks/Foundation.framework"
"${MACOSX_PLATFORM_PATH}/Developer/Library/Frameworks/XCTest.framework"
--- a/llbuild/products/libllbuild/CMakeLists.txt
+++ b/llbuild/products/libllbuild/CMakeLists.txt
@@ -23,7 +23,7 @@ target_link_libraries(llbuild PRIVATE
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
target_link_libraries(llbuild PRIVATE
- curses)
+ ncurses tinfo)
endif()
target_include_directories(llbuild
--- a/llbuild/products/llbuild/CMakeLists.txt
+++ b/llbuild/products/llbuild/CMakeLists.txt
@@ -15,5 +15,5 @@ set_target_properties(llbuild-tool PROPERTIES
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(llbuild-tool PRIVATE
- curses)
+ ncurses tinfo)
endif()
--- a/llbuild/products/swift-build-tool/CMakeLists.txt
+++ b/llbuild/products/swift-build-tool/CMakeLists.txt
@@ -10,7 +10,7 @@ target_link_libraries(swift-build-tool PRIVATE
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(swift-build-tool PRIVATE
- curses)
+ ncurses tinfo)
endif()
install(TARGETS swift-build-tool
--- a/llbuild/tests/lit.site.cfg.in
+++ b/llbuild/tests/lit.site.cfg.in
@@ -21,7 +21,7 @@ config.sqlite_library = "@SQLite3_LIBRARY@"
if sys.platform == 'Windows':
config.curses_library = ''
else:
- config.curses_library = '-lcurses'
+ config.curses_library = '-lncurses -ltinfo'
config.threads_library = "@CMAKE_THREAD_LIBS_INIT@"
if "@CMAKE_DL_LIBS@":
config.dl_library = "-l@CMAKE_DL_LIBS@"
--- a/llbuild/unittests/Basic/CMakeLists.txt
+++ b/llbuild/unittests/Basic/CMakeLists.txt
@@ -14,5 +14,5 @@ target_link_libraries(BasicTests PRIVATE
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(BasicTests PRIVATE
- curses)
+ ncurses tinfo)
endif()
--- a/llbuild/unittests/BuildSystem/CMakeLists.txt
+++ b/llbuild/unittests/BuildSystem/CMakeLists.txt
@@ -16,5 +16,5 @@ target_link_libraries(BuildSystemTests PRIVATE
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(BuildSystemTests PRIVATE
- curses)
+ ncurses tinfo)
endif()
--- a/llbuild/unittests/CAPI/CMakeLists.txt
+++ b/llbuild/unittests/CAPI/CMakeLists.txt
@@ -15,5 +15,5 @@ target_link_libraries(CAPITests PRIVATE
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(CAPITests PRIVATE
- curses)
+ ncurses tinfo)
endif()
--- a/llbuild/unittests/Core/CMakeLists.txt
+++ b/llbuild/unittests/Core/CMakeLists.txt
@@ -15,6 +15,6 @@ target_link_libraries(CoreTests PRIVATE
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(CoreTests PRIVATE
- curses)
+ ncurses tinfo)
endif()
--- a/llbuild/unittests/Ninja/CMakeLists.txt
+++ b/llbuild/unittests/Ninja/CMakeLists.txt
@@ -8,5 +8,5 @@ target_link_libraries(NinjaTests PRIVATE
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(NinjaTests PRIVATE
- curses)
+ ncurses tinfo)
endif()
--- a/llbuild/utils/adjust-times/CMakeLists.txt
+++ b/llbuild/utils/adjust-times/CMakeLists.txt
@@ -7,5 +7,5 @@ target_link_libraries(adjust-times PRIVATE llvmSupport)
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(adjust-times PRIVATE
- curses)
+ ncurses tinfo)
endif()
|