From a97d419be476df7d35f3fecfd9fc0516fab4c548 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 15 Aug 2023 14:31:13 -0700 Subject: [PATCH] Allow swiftdoc in compile_module_interface swiftdoc files are produced when building things with -enable-library-evolution. If downstream IDE integrations want to grab them they should be propagated correctly so that that's possible. --- swift/internal/compiling.bzl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/swift/internal/compiling.bzl b/swift/internal/compiling.bzl index b9405acac..49ff09b81 100644 --- a/swift/internal/compiling.bzl +++ b/swift/internal/compiling.bzl @@ -2000,7 +2000,8 @@ def compile_module_interface( module_name, swiftinterface_file, swift_infos, - swift_toolchain): + swift_toolchain, + swiftdoc = None): """Compiles a Swift module interface. Args: @@ -2019,6 +2020,8 @@ def compile_module_interface( swift_infos: A list of `SwiftInfo` providers from dependencies of the target being compiled. swift_toolchain: The `SwiftToolchainInfo` provider of the toolchain. + swiftdoc: An optional `.swiftdoc` file to propagate in the created + SwiftInfo Returns: A Swift module context (as returned by `swift_common.create_module`) @@ -2108,7 +2111,7 @@ def compile_module_interface( feature_name = SWIFT_FEATURE_SYSTEM_MODULE, ), swift = create_swift_module( - swiftdoc = None, + swiftdoc = swiftdoc, swiftinterface = swiftinterface_file, swiftmodule = swiftmodule_file, ),