Merge pull request #79952 from swiftlang/egorzhdan/darwin-cxx

[cxx-interop] Allow Darwin overlay to be rebuilt with C++ interop enabled
This commit is contained in:
Egor Zhdan
2025-03-13 10:56:34 +00:00
committed by GitHub

View File

@@ -2102,11 +2102,9 @@ InterfaceSubContextDelegateImpl::runInSubCompilerInstance(StringRef moduleName,
BuildArgs.push_back("-module-name");
BuildArgs.push_back(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.
// FIXME: Hack for CoreGraphics.swiftmodule, which cannot be rebuilt because
// of a CF_OPTIONS bug (rdar://142762174).
if (moduleName == "Darwin" || moduleName == "CoreGraphics") {
if (moduleName == "CoreGraphics") {
subInvocation.getLangOptions().EnableCXXInterop = false;
subInvocation.getLangOptions().cxxInteropCompatVersion = {};
BuildArgs.erase(llvm::remove_if(BuildArgs,