mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[cxx-interop] Workaround compiler error when importing CoreGraphics with C++ interop
The CoreGraphics overlay refers to symbols declared via `CF_OPTIONS` macro, which is causing issues in C++ language mode due to the macro definition being different. This teaches the module interface loader to drop the C++ interop flag when rebuilding the CoreGraphics overlay from its interface. rdar://142762174
This commit is contained in:
@@ -2202,7 +2202,9 @@ InterfaceSubContextDelegateImpl::runInSubCompilerInstance(StringRef moduleName,
|
||||
|
||||
// FIXME: Hack for Darwin.swiftmodule, which cannot be rebuilt with C++
|
||||
// interop enabled by the Swift CI because it uses an old host SDK.
|
||||
if (moduleName == "Darwin") {
|
||||
// FIXME: Hack for CoreGraphics.swiftmodule, which cannot be rebuilt because
|
||||
// of a CF_OPTIONS bug (rdar://142762174).
|
||||
if (moduleName == "Darwin" || moduleName == "CoreGraphics") {
|
||||
subInvocation.getLangOptions().EnableCXXInterop = false;
|
||||
subInvocation.getLangOptions().cxxInteropCompatVersion = {};
|
||||
BuildArgs.erase(llvm::remove_if(BuildArgs,
|
||||
|
||||
Reference in New Issue
Block a user