Skip to content

Commit 7a71441

Browse files
committed
[CMake] Enable StringProcessing build
Enable building the regex parser as part of the new runtime build steps.
1 parent 38a5fd6 commit 7a71441

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

CMakeLists.txt

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
16271627

16281628
DEPENDS PopulateRuntimeSourceDir
16291629
CMAKE_ARGS
1630-
-DCMAKE_INSTALL_LIBDIR:FILEPATH=lib/swift/${SWIFT_SDK_${sdk}_LIB_SUBDIR}/${arch}
1630+
-DCMAKE_INSTALL_LIBDIR:FILEPATH=lib
16311631
# Compiler will see mismatched swift modules and fail initial checks
16321632
-DCMAKE_Swift_COMPILER_WORKS:BOOLEAN=YES
16331633
-DBUILD_SHARED_LIBS:BOOLEAN=YES # TODO: Make this configurable
@@ -1643,12 +1643,32 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
16431643
-DCMAKE_CXX_COMPILER_TARGET:STRING=${stdlib_target_triple}
16441644
-DCMAKE_COLOR_DIAGNOSTICS:BOOLEAN=${CMAKE_COLOR_DIAGNOSTICS}
16451645
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
1646-
-DSwiftCore_PLATFORM_SUBDIR=${SWIFT_SDK_${sdk}_LIB_SUBDIR}
1647-
-DSwiftCore_ARCH_SUBDIR=${arch}
1646+
-DSwiftCore_INSTALL_NESTED_SUBDIR=YES
16481647
-DSwiftCore_ENABLE_CONCURRENCY=YES)
16491648
if(NOT ${CMAKE_CROSSCOMPILING})
1650-
add_dependencies("${stdlib_target}" swift-frontend)
1649+
add_dependencies("${stdlib_target}-core" swift-frontend)
16511650
endif()
1651+
1652+
ExternalProject_Get_Property("${stdlib_target}-core" INSTALL_DIR)
1653+
1654+
ExternalProject_Add("${stdlib_target}-StringProcessing"
1655+
SOURCE_DIR
1656+
"${CMAKE_CURRENT_SOURCE_DIR}/Runtimes/Supplemental/StringProcessing"
1657+
DEPENDS "${stdlib_target}-core"
1658+
INSTALL_DIR "${INSTALL_DIR}"
1659+
INSTALL_COMMAND "" # No install story set up yet
1660+
CMAKE_ARGS
1661+
-DBUILD_SHARED_LIBS=YES
1662+
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
1663+
-DCMAKE_INSTALL_PREFIX:FILEPATH=${INSTALL_DIR}
1664+
-DCMAKE_Swift_COMPILER:FILEPATH=$<IF:$<BOOL:${CMAKE_CROSSCOMPILING}>,${CMAKE_Swift_COMPILER},$<PATH:REPLACE_FILENAME,$<TARGET_FILE:swift-frontend>,swiftc>>
1665+
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
1666+
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
1667+
-DCMAKE_Swift_COMPILER_TARGET:STRING=${stdlib_target_triple}
1668+
-DCMAKE_C_COMPILER_TARGET:STRING=${stdlib_target_triple}
1669+
-DCMAKE_CXX_COMPILER_TARGET:STRING=${stdlib_target_triple}
1670+
-DCMAKE_COLOR_DIAGNOSTICS:BOOLEAN=${CMAKE_COLOR_DIAGNOSTICS}
1671+
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM})
16521672
endforeach()
16531673
endforeach()
16541674
endif()

0 commit comments

Comments
 (0)