Skip to content

Commit 8d15d57

Browse files
authored
Merge pull request #81597 from compnerd/objectification
Runtimes: mark CommandLineSupporta as an OBJECT library
2 parents d27a021 + 028624c commit 8d15d57

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

Runtimes/Core/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,10 @@ add_subdirectory(Demangling)
209209
add_subdirectory(Threading)
210210
add_subdirectory(runtime)
211211
add_subdirectory(stubs)
212-
add_subdirectory(CommandLineSupport)
213212
add_subdirectory(core)
213+
if(SwiftCore_ENABLE_COMMANDLINE_SUPPORT)
214+
add_subdirectory(CommandLineSupport)
215+
endif()
214216
if(SwiftCore_ENABLE_ONONESUPPORT)
215217
add_subdirectory(SwiftOnoneSupport)
216218
endif()
Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
1-
if(SwiftCore_ENABLE_COMMANDLINE_SUPPORT)
2-
add_library(swiftCommandLineSupport STATIC CommandLine.cpp)
3-
target_include_directories(swiftCommandLineSupport PRIVATE
4-
"${SwiftCore_SWIFTC_SOURCE_DIR}/include"
5-
"${PROJECT_BINARY_DIR}/include")
6-
target_compile_definitions(swiftCommandLineSupport PUBLIC
7-
-DSWIFT_STDLIB_HAS_COMMANDLINE)
8-
target_compile_definitions(swiftCommandLineSupport PRIVATE
9-
$<$<BOOL:${BUILD_SHARED_LIBS}>:-DswiftCore_EXPORTS>)
10-
11-
target_link_libraries(swiftCommandLineSupport PRIVATE
12-
swiftShims)
13-
14-
if(NOT BUILD_SHARED_LIBS)
15-
install(TARGETS swiftCommandLineSupport
16-
EXPORT SwiftCoreTargets
17-
COMPONENT SwiftCore_runtime)
18-
endif()
19-
endif()
1+
# TODO(etcwilde) migrate this into subdir subdirectory once the migration is
2+
# completed.
3+
target_sources(swiftCore PRIVATE
4+
CommandLine.cpp)
5+
target_compile_definitions(swiftCore PUBLIC
6+
-DSWIFT_STDLIB_HAS_COMMANDLINE)
7+
target_include_directories(swiftCore PRIVATE
8+
"${SwiftCore_SWIFTC_SOURCE_DIR}/include"
9+
"${PROJECT_BINARY_DIR}/include")

Runtimes/Core/core/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ if(NOT LINUX AND NOT ANDROID)
259259
endif()
260260

261261
if(SwiftCore_ENABLE_COMMANDLINE_SUPPORT)
262-
target_sources(swiftCore PRIVATE CommandLine.swift)
263-
target_link_libraries(swiftCore PRIVATE swiftCommandLineSupport)
262+
target_sources(swiftCore PRIVATE
263+
CommandLine.swift)
264264
endif()
265265

266266
if(SwiftCore_ENABLE_VECTOR_TYPES)

0 commit comments

Comments
 (0)