Adding C/C++ portion of CommandLine support

Hooking up the bits of the build to link the swift commandline support
C++ bits into swiftCore.
This commit is contained in:
Evan Wilde
2024-11-07 15:07:17 -08:00
parent 12fb294cce
commit 08daac6466
4 changed files with 17 additions and 2 deletions

View File

@@ -90,4 +90,5 @@ add_subdirectory(Demangling)
add_subdirectory(Threading)
add_subdirectory(runtime)
add_subdirectory(stubs)
add_subdirectory(CommandLineSupport)
add_subdirectory(core)

View File

@@ -0,0 +1,13 @@
if(SwiftCore_ENABLE_COMMANDLINE_SUPPORT)
add_library(swiftCommandLineSupport STATIC CommandLine.cpp)
target_include_directories(swiftCommandLineSupport PRIVATE
"${SwiftCore_SWIFTC_SOURCE_DIR}/include"
"${PROJECT_BINARY_DIR}/include")
target_link_libraries(swiftCommandLineSupport PRIVATE
swiftShims)
if(NOT BUILD_SHARED_LIBS)
install(TARGETS swiftCommandLineSupport)
endif()
endif()

View File

@@ -241,9 +241,9 @@ add_library(swiftCore
set_target_properties(swiftCore PROPERTIES Swift_MODULE_NAME Swift)
if(SwiftCore_ENABLE_COMMANDLINE)
# TODO: Pull in the CommandLine C++ files too
if(SwiftCore_ENABLE_COMMANDLINE_SUPPORT)
target_sources(swiftCore PRIVATE CommandLine.swift)
target_link_libraries(swiftCore PRIVATE swiftCommandLineSupport)
endif()
if(SwiftCore_ENABLE_VECTOR_TYPES)

View File

@@ -65,6 +65,7 @@ set(CoreLibs
runtime
CompatibilityOverride
stubs
CommandLineSupport
core)
# Add these as we get them building