Skip to content

Commit 08daac6

Browse files
committed
Adding C/C++ portion of CommandLine support
Hooking up the bits of the build to link the swift commandline support C++ bits into swiftCore.
1 parent 12fb294 commit 08daac6

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

Runtimes/Core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@ add_subdirectory(Demangling)
9090
add_subdirectory(Threading)
9191
add_subdirectory(runtime)
9292
add_subdirectory(stubs)
93+
add_subdirectory(CommandLineSupport)
9394
add_subdirectory(core)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
7+
target_link_libraries(swiftCommandLineSupport PRIVATE
8+
swiftShims)
9+
10+
if(NOT BUILD_SHARED_LIBS)
11+
install(TARGETS swiftCommandLineSupport)
12+
endif()
13+
endif()

Runtimes/Core/core/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ add_library(swiftCore
241241

242242
set_target_properties(swiftCore PROPERTIES Swift_MODULE_NAME Swift)
243243

244-
if(SwiftCore_ENABLE_COMMANDLINE)
245-
# TODO: Pull in the CommandLine C++ files too
244+
if(SwiftCore_ENABLE_COMMANDLINE_SUPPORT)
246245
target_sources(swiftCore PRIVATE CommandLine.swift)
246+
target_link_libraries(swiftCore PRIVATE swiftCommandLineSupport)
247247
endif()
248248

249249
if(SwiftCore_ENABLE_VECTOR_TYPES)

Runtimes/Resync.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ set(CoreLibs
6565
runtime
6666
CompatibilityOverride
6767
stubs
68+
CommandLineSupport
6869
core)
6970

7071
# Add these as we get them building

0 commit comments

Comments
 (0)