Skip to content

Commit 07d611e

Browse files
committed
Merge branch 'main' of https://github.com/swiftlang/swift into maxd/install-wasmkit
2 parents 9ba86e7 + f861cfc commit 07d611e

File tree

663 files changed

+12546
-10789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

663 files changed

+12546
-10789
lines changed

.github/CODEOWNERS

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,28 @@
88

99
# TODO: /.clang-format
1010

11-
/.clang-tidy @egorzhdan
11+
/.clang-tidy @egorzhdan
1212

13-
# TODO: /.dir-locals.el
13+
/.dir-locals.el @al45tair
14+
/.editorconfig @hamishknight
1415
# TODO: /.flake8
15-
# TODO: /.gitattributes
16+
/.gitattributes @shahmishal
1617

1718
# .github
1819
/.github/ @shahmishal
1920
/.github/CODEOWNERS @AnthonyLatsis @shahmishal
20-
/.github/ISSUE_TEMPLATE/ @AnthonyLatsis @hborla @LucianoPAlmeida @shahmishal @xedin
21-
/.github/PULL_REQUEST_TEMPLATE.md @AnthonyLatsis @hborla @LucianoPAlmeida @shahmishal @xedin
21+
/.github/ISSUE_TEMPLATE/ @AnthonyLatsis @hborla @shahmishal @xedin
22+
/.github/PULL_REQUEST_TEMPLATE.md @AnthonyLatsis @hborla @shahmishal @xedin
2223

23-
# TODO: /.gitignore
24+
/.gitignore @shahmishal
2425
# TODO: /.mailmap
2526
# TODO: /Brewfile
26-
# TODO: /CHANGELOG.md
27+
/CHANGELOG.md @hborla
2728
# TODO: /CMakeLists.txt
28-
# TODO: /CODE_OF_CONDUCT.md
29-
# TODO: /CODE_OWNERS.TXT
30-
# TODO: /CONTRIBUTING.md
31-
# TODO: /LICENSE.txt
29+
/CODE_OF_CONDUCT.md @swiftlang/core-team
30+
/CODE_OWNERS.TXT @swiftlang/core-team
31+
/CONTRIBUTING.md @AnthonyLatsis @xedin
32+
/LICENSE.txt @swiftlang/core-team
3233
# TODO: /README.md
3334

3435
# Runtimes
@@ -60,7 +61,7 @@
6061
/docs/ABI/RegisterUsage.md @al45tair
6162
/docs/CrossCompilationModel.md @MaxDesiatov
6263
/docs/Generics @slavapestov
63-
/docs/HowToGuides/ @AnthonyLatsis @LucianoPAlmeida @xedin
64+
/docs/HowToGuides/ @AnthonyLatsis @xedin
6465
/docs/Optimizer* @eeckstein
6566
/docs/SIL* @jckarter
6667
/docs/Windows* @compnerd
@@ -223,7 +224,7 @@
223224
/test/Generics/ @hborla @slavapestov
224225
/test/Generics/inverse* @kavon
225226
/test/IDE/ @ahoppen @bnbarham @hamishknight @rintaro
226-
/test/IRGen/ @rjmccall
227+
/test/IRGen/ @AnthonyLatsis @rjmccall
227228
/test/Index/ @ahoppen @bnbarham @hamishknight @rintaro
228229
/test/Interop/ @zoecarver @egorzhdan @Xazax-hun @j-hui @fahadnayyar @susmonteiro @hnrklssn
229230
/test/Macros/SwiftifyImport @hnrklssn @Xazax-hun

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,13 +1665,14 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
16651665

16661666
ExternalProject_Get_Property("${stdlib_target}-core" INSTALL_DIR)
16671667

1668-
ExternalProject_Add("${stdlib_target}-StringProcessing"
1669-
SOURCE_DIR
1670-
"${CMAKE_CURRENT_SOURCE_DIR}/Runtimes/Supplemental/StringProcessing"
1668+
ExternalProject_Add("${stdlib_target}-Supplemental"
1669+
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Runtimes/Supplemental"
16711670
DEPENDS "${stdlib_target}-core"
16721671
INSTALL_DIR "${INSTALL_DIR}"
1673-
INSTALL_COMMAND "" # No install story set up yet
1672+
INSTALL_COMMAND ""
1673+
LIST_SEPARATOR "|"
16741674
CMAKE_ARGS
1675+
-DSwift_ENABLE_RUNTIMES=StringProcessing
16751676
-DBUILD_SHARED_LIBS=YES
16761677
-DCMAKE_Swift_COMPILER_WORKS:BOOLEAN=YES
16771678
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
| | **Architecture** | **Build** |
1010
|---|:---:|:---:|
11-
| **macOS** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-macos/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-macos)|
11+
| **macOS** | Universal |[![Build Status](https://ci.swift.org/job/oss-swift-package-macos/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-macos)|
1212
| **Ubuntu 20.04** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04)|
1313
| **Ubuntu 20.04** | AArch64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64)|
1414
| **Ubuntu 22.04** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04)|

Runtimes/Core/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ add_library(swift_Concurrency
8181
PartialAsyncTask.swift
8282
PlatformExecutorDarwin.swift
8383
PlatformExecutorLinux.swift
84+
PlatformExecutorFreeBSD.swift
8485
PlatformExecutorOpenBSD.swift
8586
PlatformExecutorWindows.swift
8687
PriorityQueue.swift

Runtimes/Core/core/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ add_library(swiftCore
188188
StringWordBreaking.swift
189189
Substring.swift
190190
SwiftNativeNSArray.swift
191-
SwiftSettings.swift
192191
TemporaryAllocation.swift
193192
ThreadLocalStorage.swift
194193
UIntBuffer.swift

Runtimes/Supplemental/CMakeLists.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
cmake_minimum_required(VERSION 3.29)
2+
3+
project(SwiftRuntime LANGUAGES Swift C CXX)
4+
5+
include(ExternalProject)
6+
include(GNUInstallDirs)
7+
8+
set(SwiftRuntime_SWIFTC_SOURCE_DIR "${PROJECT_SOURCE_DIR}/../../")
9+
10+
foreach(lib ${Swift_ENABLE_RUNTIMES})
11+
string(TOLOWER ${lib} name)
12+
set(SwiftRuntime_ENABLE_${name} YES)
13+
endforeach()
14+
15+
if(SwiftCore_DIR)
16+
set(SwiftCore_DIR_FLAG "-DSwiftCore_DIR=${SwiftCore_DIR}")
17+
endif()
18+
19+
if(CMAKE_MAKE_PROGRAM)
20+
set(MAKE_PROGRAM_FLAG "-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}")
21+
endif()
22+
23+
set(COMMON_OPTIONS
24+
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
25+
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
26+
-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
27+
-DCMAKE_INSTALL_NAME_DIR=${CMAKE_INSTALL_NAME_DIR}
28+
-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=${CMAKE_BUILD_WITH_INSTALL_NAME_DIR}
29+
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
30+
-DCMAKE_COLOR_DIAGNOSTICS=${CMAKE_COLOR_DIAGNOSTICS}
31+
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
32+
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
33+
-DCMAKE_Swift_COMPILER=${CMAKE_Swift_COMPILER}
34+
-DCMAKE_C_COMPILER_TARGET=${CMAKE_C_COMPILER_TARGET}
35+
-DCMAKE_CXX_COMPILER_TARGET=${CMAKE_CXX_COMPILER_TARGET}
36+
-DCMAKE_Swift_COMPILER_TARGET=${CMAKE_Swift_COMPILER_TARGET}
37+
${SwiftCore_DIR_FLAG}
38+
${MAKE_PROGRAM_FLAG})
39+
40+
# StringProcessing
41+
if(SwiftRuntime_ENABLE_stringprocessing)
42+
ExternalProject_Add(StringProcessing
43+
PREFIX "StringProcessing"
44+
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/StringProcessing"
45+
INSTALL_DIR "${CMAKE_INSTALL_PREFIX}"
46+
INSTALL_COMMAND ""
47+
CMAKE_ARGS
48+
${COMMON_OPTIONS})
49+
endif()

Runtimes/Supplemental/Readme.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Swift Supplemental Libraries
2+
3+
The supplemental libraries are all libraries that are not one of the Core or
4+
overlay libraries. Each supplemental library builds as an independent project.
5+
6+
The supplemental libraries are:
7+
- CxxInterop
8+
- Differentiation
9+
- Distributed
10+
- Observation
11+
- StringProcessing
12+
- Runtime
13+
- Synchronization
14+
15+
The top-level Supplemental CMakeLists supplies a super-build pattern for
16+
configuring and compiling each of the supplemental library projects through a
17+
single CMake invocation. The `Swift_ENABLE_RUNTIMES` CMake option enables the
18+
specified supplemental libraries. All libraries configured this way are built
19+
with the same compilers, against the same sysroot, with the same target triple
20+
and installed into the same location.
21+
22+
## Super-Build
23+
24+
Configuring each project independently is tedious. The Supplemental directory
25+
contains a Super-Build CMakeLists that invokes the build of each of the
26+
supplemental libraries in the appropriate order, simplifying the process of
27+
building each library.
28+
29+
Important configuration variables:
30+
- `Swift_ENABLE_RUNTIMES`: Used to configure which runtime libraries are built.
31+
32+
The super-build forwards the following variables to each sub-project
33+
unconditionally:
34+
- `BUILD_SHARED_LIBS`
35+
- `CMAKE_BUILD_TYPE`
36+
- `CMAKE_INSTALL_PREFIX`
37+
- `CMAKE_COLOR_DIAGNOSTICS`
38+
- `CMAKE_C_COMPILER`
39+
- `CMAKE_C_COMPILER_TARGET`
40+
- `CMAKE_CXX_COMPILER`
41+
- `CMAKE_CXX_COMPILER_TARGET`
42+
- `CMAKE_Swift_COMPILER`
43+
- `CMAKE_Swift_COMPILER_TARGET`
44+
45+
If set, the super-build forwards the following values to each sub-project:
46+
47+
- `SwiftCore_DIR`: Path to the SwiftCore build directory
48+
- `CMAKE_MAKE_PROGRAM`: Path to `ninja`
49+
50+
The super-build is for convenience. If more fine-grained control is desired for
51+
configuring a specific runtime library, you may configure that library
52+
independently.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Add flags for generating the zippered target variant in the build
2+
3+
# Initialize `${PROJECT_NAME}_VARIANT_MODULE_TRIPLE` if the driver is able to emit
4+
# modules for the target variant.
5+
6+
if(${PROJECT_NAME}_COMPILER_VARIANT_TARGET)
7+
add_compile_options(
8+
"$<$<COMPILE_LANGUAGE:C,CXX>:SHELL:-darwin-target-variant ${${PROJECT_NAME}_COMPILER_VARIANT_TARGET}>"
9+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-target-variant ${${PROJECT_NAME}_COMPILER_VARIANT_TARGET}>"
10+
11+
# TODO: Remove me once we have a driver with
12+
# https://github.com/swiftlang/swift-driver/pull/1803
13+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xclang-linker -darwin-target-variant -Xclang-linker ${${PROJECT_NAME}_COMPILER_VARIANT_TARGET}>")
14+
15+
add_link_options(
16+
"$<$<LINK_LANGUAGE:C,CXX>:SHELL:-darwin-target-variant ${${PROJECT_NAME}_COMPILER_VARIANT_TARGET}>"
17+
"$<$<LINK_LANGUAGE:Swift>:SHELL:-target-variant ${${PROJECT_NAME}_COMPILER_VARIANT_TARGET}>"
18+
19+
# TODO: Remove me once we have a driver with
20+
# https://github.com/swiftlang/swift-driver/pull/1803
21+
"$<$<LINK_LANGUAGE:Swift>:SHELL:-Xclang-linker -darwin-target-variant -Xclang-linker ${${PROJECT_NAME}_COMPILER_VARIANT_TARGET}>")
22+
23+
# TODO: Once we are guaranteed to have a driver with the variant module path
24+
# support everywhere, we should integrate this into PlatformInfo.cmake
25+
check_compiler_flag(Swift "-emit-variant-module-path ${CMAKE_CURRENT_BINARY_DIR}/CompilerID/variant.swiftmodule" HAVE_Swift_VARIANT_MODULE_PATH_FLAG)
26+
if(HAVE_Swift_VARIANT_MODULE_PATH_FLAG)
27+
# Get variant module triple
28+
set(module_triple_command "${CMAKE_Swift_COMPILER}" -print-target-info -target ${${PROJECT_NAME}_COMPILER_VARIANT_TARGET})
29+
execute_process(COMMAND ${module_triple_command} OUTPUT_VARIABLE target_info_json)
30+
message(CONFIGURE_LOG "Swift target variant info: ${target_info_json}")
31+
32+
33+
string(JSON module_triple GET "${target_info_json}" "target" "moduleTriple")
34+
set(${PROJECT_NAME}_VARIANT_MODULE_TRIPLE "${module_triple}" CACHE STRING "Triple used for installed swift{module,interface} files for the target variant")
35+
mark_as_advanced(${PROJECT_NAME}_VARIANT_MODULE_TRIPLE)
36+
message(CONFIGURE_LOG "Swift target variant module triple: ${module_triple}")
37+
endif()
38+
endif()
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Generate and install swift interface files
2+
3+
# TODO: CMake should learn how to model library evolution and generate this
4+
# stuff automatically.
5+
6+
7+
# Generate a swift interface file for the target if library evolution is enabled
8+
function(emit_swift_interface target)
9+
# Generate the target-variant binary swift module when performing zippered
10+
# build
11+
if(${PROJECT_NAME}_VARIANT_MODULE_TRIPLE)
12+
set(variant_module_tmp_dir "${CMAKE_CURRENT_BINARY_DIR}/${target}-${${PROJECT_NAME}_VARIANT_MODULE_TRIPLE}")
13+
file(MAKE_DIRECTORY "${variant_module_tmp_dir}")
14+
target_compile_options(${target} PRIVATE
15+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-emit-variant-module-path ${variant_module_tmp_dir}/${target}.swiftmodule>")
16+
endif()
17+
18+
# Generate textual swift interfaces is library-evolution is enabled
19+
if(${PROJECT_NAME}_ENABLE_LIBRARY_EVOLUTION)
20+
target_compile_options(${target} PRIVATE
21+
$<$<COMPILE_LANGUAGE:Swift>:-emit-module-interface-path$<SEMICOLON>${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_PROPERTY:${target},Swift_MODULE_NAME>.swiftinterface>
22+
$<$<COMPILE_LANGUAGE:Swift>:-emit-private-module-interface-path$<SEMICOLON>${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_PROPERTY:${target},Swift_MODULE_NAME>.private.swiftinterface>
23+
$<$<COMPILE_LANGUAGE:Swift>:-library-level$<SEMICOLON>api>
24+
$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend$<SEMICOLON>-require-explicit-availability=ignore>)
25+
26+
# Emit catalyst swiftmodules and interfaces
27+
if(${PROJECT_NAME}_VARIANT_MODULE_TRIPLE)
28+
target_compile_options(${target} PRIVATE
29+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-emit-variant-module-interface-path ${variant_module_tmp_dir}/${target}.swiftinterface>"
30+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-emit-variant-private-module-interface-path ${variant_module_tmp_dir}/${target}.private.swiftinterface>")
31+
endif()
32+
endif()
33+
endfunction()
34+
35+
# Install the generated swift interface file for the target if library evolution
36+
# is enabled.
37+
function(install_swift_interface target)
38+
# Install binary swift modules
39+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_PROPERTY:${target},Swift_MODULE_NAME>.swiftmodule"
40+
RENAME "${${PROJECT_NAME}_MODULE_TRIPLE}.swiftmodule"
41+
DESTINATION "${${PROJECT_NAME}_INSTALL_SWIFTMODULEDIR}/$<TARGET_PROPERTY:${target},Swift_MODULE_NAME>.swiftmodule"
42+
COMPONENT ${PROJECT_NAME}_development)
43+
if(${PROJECT_NAME}_VARIANT_MODULE_TRIPLE)
44+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${target}-${${PROJECT_NAME}_VARIANT_MODULE_TRIPLE}/${target}.swiftmodule"
45+
RENAME "${${PROJECT_NAME}_VARIANT_MODULE_TRIPLE}.swiftmodule"
46+
DESTINATION "${${PROJECT_NAME}_INSTALL_SWIFTMODULEDIR}/$<TARGET_PROPERTY:${target},Swift_MODULE_NAME>.swiftmodule"
47+
COMPONENT ${PROJECT_NAME}_development)
48+
endif()
49+
50+
# Install Swift interfaces if library-evolution is enabled
51+
if(${PROJECT_NAME}_ENABLE_LIBRARY_EVOLUTION)
52+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_PROPERTY:${target},Swift_MODULE_NAME>.swiftinterface"
53+
RENAME "${${PROJECT_NAME}_MODULE_TRIPLE}.swiftinterface"
54+
DESTINATION "${${PROJECT_NAME}_INSTALL_SWIFTMODULEDIR}/$<TARGET_PROPERTY:${target},Swift_MODULE_NAME>.swiftmodule"
55+
COMPONENT ${PROJECT_NAME}_development)
56+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_PROPERTY:${target},Swift_MODULE_NAME>.private.swiftinterface"
57+
RENAME "${${PROJECT_NAME}_MODULE_TRIPLE}.private.swiftinterface"
58+
DESTINATION "${${PROJECT_NAME}_INSTALL_SWIFTMODULEDIR}/$<TARGET_PROPERTY:${target},Swift_MODULE_NAME>.swiftmodule"
59+
COMPONENT ${PROJECT_NAME}_development)
60+
61+
# Install catalyst interface files
62+
if(${PROJECT_NAME}_VARIANT_MODULE_TRIPLE)
63+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${target}-${${PROJECT_NAME}_VARIANT_MODULE_TRIPLE}/${target}.swiftinterface"
64+
RENAME "${${PROJECT_NAME}_VARIANT_MODULE_TRIPLE}.swiftinterface"
65+
DESTINATION "${${PROJECT_NAME}_INSTALL_SWIFTMODULEDIR}/$<TARGET_PROPERTY:${target},Swift_MODULE_NAME>.swiftmodule"
66+
COMPONENT ${PROJECT_NAME}_development)
67+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${target}-${${PROJECT_NAME}_VARIANT_MODULE_TRIPLE}/${target}.private.swiftinterface"
68+
RENAME "${${PROJECT_NAME}_VARIANT_MODULE_TRIPLE}.private.swiftinterface"
69+
DESTINATION "${${PROJECT_NAME}_INSTALL_SWIFTMODULEDIR}/$<TARGET_PROPERTY:${target},Swift_MODULE_NAME>.swiftmodule"
70+
COMPONENT ${PROJECT_NAME}_development)
71+
endif()
72+
endif()
73+
endfunction()
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
if(NOT ${PROJECT_NAME}_SIZEOF_POINTER)
2+
set(${PROJECT_NAME}_SIZEOF_POINTER "${CMAKE_SIZEOF_VOID_P}" CACHE STRING "Size of a pointer in bytes")
3+
message(CONFIGURE_LOG "Stdlib Pointer size: ${CMAKE_SIZEOF_VOID_P}")
4+
mark_as_advanced(${PROJECT_NAME}_SIZEOF_POINTER)
5+
endif()
6+
7+
# TODO: This logic should migrate to CMake once CMake supports installing swiftmodules
8+
set(module_triple_command "${CMAKE_Swift_COMPILER}" -print-target-info)
9+
if(CMAKE_Swift_COMPILER_TARGET)
10+
list(APPEND module_triple_command -target ${CMAKE_Swift_COMPILER_TARGET})
11+
endif()
12+
execute_process(COMMAND ${module_triple_command} OUTPUT_VARIABLE target_info_json)
13+
message(CONFIGURE_LOG "Swift target info: ${module_triple_command}\n"
14+
"${target_info_json}")
15+
16+
if(NOT ${PROJECT_NAME}_MODULE_TRIPLE)
17+
string(JSON module_triple GET "${target_info_json}" "target" "moduleTriple")
18+
set(${PROJECT_NAME}_MODULE_TRIPLE "${module_triple}" CACHE STRING "Triple used for installed swift{doc,module,interface} files")
19+
mark_as_advanced(${PROJECT_NAME}_MODULE_TRIPLE)
20+
21+
message(CONFIGURE_LOG "Swift module triple: ${module_triple}")
22+
endif()
23+
24+
if(NOT ${PROJECT_NAME}_PLATFORM_SUBDIR)
25+
string(JSON platform GET "${target_info_json}" "target" "platform")
26+
set(${PROJECT_NAME}_PLATFORM_SUBDIR "${platform}" CACHE STRING "Platform name used for installed swift{doc,module,interface} files")
27+
mark_as_advanced(${PROJECT_NAME}_PLATFORM_SUBDIR)
28+
29+
message(CONFIGURE_LOG "Swift platform: ${platform}")
30+
endif()
31+
32+
if(NOT ${PROJECT_NAME}_ARCH_SUBDIR)
33+
string(JSON arch GET "${target_info_json}" "target" "arch")
34+
set(${PROJECT_NAME}_ARCH_SUBDIR "${arch}" CACHE STRING "Architecture used for setting the architecture subdirectory")
35+
mark_as_advanced(${PROJECT_NAME}_ARCH_SUBDIR)
36+
37+
message(CONFIGURE_LOG "Swift Arch: ${arch}")
38+
endif()

0 commit comments

Comments
 (0)