From 9fff5a9edd2516ca22591f314696ad06da893d77 Mon Sep 17 00:00:00 2001 From: Richard Howell Date: Fri, 31 Jan 2025 14:10:40 -0800 Subject: [PATCH] disable swiftinterface verification Summary: When compiling with library evolution and emitting a swiftinterface file, the swift-driver will add module verification steps: https://github.com/swiftlang/swift-driver/blob/072409a4c28c97dd4b08e70e1de14dac042ebc43/Sources/SwiftDriver/Jobs/Planning.swift#L592-L609 This is failing existing builds with errors like: ``` 4 | import Foundation 5 | @_exported import MetaKit | `- error: underlying Objective-C module 'MetaKit' not found ``` Disable module verification for now, which matches the legacy driver behavior. Reviewed By: drodriguez Differential Revision: D68905282 fbshipit-source-id: f8b6fc2167b93ba3eb60af706144e2aef272990d --- prelude/apple/swift/swift_compilation.bzl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prelude/apple/swift/swift_compilation.bzl b/prelude/apple/swift/swift_compilation.bzl index ed455e0b971dd..3e6f44d95fcb4 100644 --- a/prelude/apple/swift/swift_compilation.bzl +++ b/prelude/apple/swift/swift_compilation.bzl @@ -543,6 +543,9 @@ def _compile_swiftmodule( swift_framework_output.swiftinterface.as_output(), "-emit-private-module-interface-path", swift_framework_output.private_swiftinterface.as_output(), + # Module verification fails here as the clang modules + # are not loaded correctly. + "-no-verify-emitted-module-interface", ]) # There is no driver flag to specify the swiftdoc output path