Skip to content

Commit ade64fd

Browse files
authored
Begin installing textual .swiftinterface instead of binary .swiftmodule in toolchain builds for non-Apple platforms (#982)
This modifies the CMake rules to begin installing textual .swiftinterface files instead of binary .swiftmodule files when performing a toolchain build for non-Apple platforms. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated. Fixes rdar://140587787
1 parent f3c9329 commit ade64fd

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

cmake/modules/SwiftModuleInstallation.cmake

+3-13
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,9 @@ function(_swift_testing_install_target module)
8686
install(FILES $<TARGET_PROPERTY:${module},Swift_MODULE_DIRECTORY>/${module_name}.swiftdoc
8787
DESTINATION "${module_dir}"
8888
RENAME ${SwiftTesting_MODULE_TRIPLE}.swiftdoc)
89-
if(APPLE)
90-
# Only Darwin has stable ABI.
91-
install(FILES $<TARGET_PROPERTY:${module},Swift_MODULE_DIRECTORY>/${module_name}.swiftinterface
92-
DESTINATION "${module_dir}"
93-
RENAME ${SwiftTesting_MODULE_TRIPLE}.swiftinterface)
94-
else()
95-
# Only install the binary .swiftmodule on platforms which do not have a
96-
# stable ABI. Other platforms will use the textual .swiftinterface
97-
# (installed above) and this limits access to this module's SPIs.
98-
install(FILES $<TARGET_PROPERTY:${module},Swift_MODULE_DIRECTORY>/${module_name}.swiftmodule
99-
DESTINATION "${module_dir}"
100-
RENAME ${SwiftTesting_MODULE_TRIPLE}.swiftmodule)
101-
endif()
89+
install(FILES $<TARGET_PROPERTY:${module},Swift_MODULE_DIRECTORY>/${module_name}.swiftinterface
90+
DESTINATION "${module_dir}"
91+
RENAME ${SwiftTesting_MODULE_TRIPLE}.swiftinterface)
10292
endfunction()
10393

10494
# Install the specified .swiftcrossimport directory for the specified declaring

0 commit comments

Comments
 (0)