Skip to content

Commit 638950c

Browse files
authored
Merge pull request #78694 from porglezomp-misc/workaround-nsoptions-appkit-uikit
2 parents 7f5686d + 7323a75 commit 638950c

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

lib/Frontend/ModuleInterfaceLoader.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,10 @@ InterfaceSubContextDelegateImpl::runInSubCompilerInstance(StringRef moduleName,
22052205
// interop enabled by the Swift CI because it uses an old host SDK.
22062206
// FIXME: Hack for CoreGraphics.swiftmodule, which cannot be rebuilt because
22072207
// of a CF_OPTIONS bug (rdar://142762174).
2208-
if (moduleName == "Darwin" || moduleName == "CoreGraphics") {
2208+
// FIXME: Hack for AppKit.swiftmodule / UIKit.swiftmodule, which cannot be
2209+
// rebuilt because of an NS_OPTIONS bug (rdar://143033209)
2210+
if (moduleName == "Darwin" || moduleName == "CoreGraphics"
2211+
|| moduleName == "AppKit" || moduleName == "UIKit") {
22092212
subInvocation.getLangOptions().EnableCXXInterop = false;
22102213
subInvocation.getLangOptions().cxxInteropCompatVersion = {};
22112214
BuildArgs.erase(llvm::remove_if(BuildArgs,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %target-swift-frontend -typecheck -verify -I %S/Inputs -cxx-interoperability-mode=default %s
2+
3+
// REQUIRES: objc_interop
4+
// REQUIRES: VENDOR=apple
5+
6+
#if canImport(AppKit)
7+
import AppKit
8+
9+
var _: AttributeScopes.AppKitAttributes.UnderlineStyleAttribute! = nil
10+
11+
#elseif canImport(UIKit)
12+
import UIKit
13+
14+
var _: AttributeScopes.AppKitAttributes.UnderlineStyleAttribute! = nil
15+
16+
#endif

0 commit comments

Comments
 (0)