From ebcfdf33d310515770e3ec73cb5b72a311e1c685 Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Fri, 21 Jun 2024 10:40:38 -0500 Subject: [PATCH] Fix symbol graph extraction when using explicit module maps or VFS overlays (#1246) Signed-off-by: Brentley Jones --- swift/toolchains/config/compile_config.bzl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/swift/toolchains/config/compile_config.bzl b/swift/toolchains/config/compile_config.bzl index 155b3c7e5..52b8c4f56 100644 --- a/swift/toolchains/config/compile_config.bzl +++ b/swift/toolchains/config/compile_config.bzl @@ -758,7 +758,7 @@ def compile_action_configs( ), ] - #### Search paths for Swift module dependencies + #### Search paths/explicit module map for Swift module dependencies action_configs.extend([ ActionConfigInfo( actions = [ @@ -795,7 +795,6 @@ def compile_action_configs( SWIFT_ACTION_COMPILE_MODULE_INTERFACE, SWIFT_ACTION_DERIVE_FILES, SWIFT_ACTION_DUMP_AST, - SWIFT_ACTION_SYMBOL_GRAPH_EXTRACT, ], configurators = [_dependencies_swiftmodules_configurator], not_features = [ @@ -840,6 +839,13 @@ def compile_action_configs( configurators = [_macro_expansion_configurator], features = [SWIFT_FEATURE__SUPPORTS_MACROS], ), + + # swift-symbolgraph-extract doesn't yet support explicit Swift module + # maps. + ActionConfigInfo( + actions = [SWIFT_ACTION_SYMBOL_GRAPH_EXTRACT], + configurators = [_dependencies_swiftmodules_configurator], + ), ]) #### Search paths for framework dependencies