Hard-code the 'Darwin' module as having been built without C++ interop

Textual interfaces for 'Darwin' built with recent compilers specify that it is built witout C++ interop enabled. However, to ensure compatibility with versions of the 'Darwin' module built with older compilers, we hard-code this fact. This is required to break the module cycle that occurs when building the 'Darwin' module with C++ interop enabled, where the underlying 'Darwin' clang module depends on C++ standard library for which the compiler brings in the 'CxxStdlib' Swift overlay, which depends on 'Darwin'.
This commit is contained in:
Artem Chikin
2025-05-29 16:47:00 -07:00
parent 20b38687c5
commit 5749ef3c14
7 changed files with 68 additions and 8 deletions

View File

@@ -214,7 +214,8 @@ int swift_symbolgraph_extract_main(ArrayRef<const char *> Args,
Options.AvailabilityIsBlockList = A->getOption().matches(OPT_block_availability_platforms);
}
Invocation.getLangOptions().setCxxInteropFromArgs(ParsedArgs, Diags);
Invocation.getLangOptions().setCxxInteropFromArgs(ParsedArgs, Diags,
Invocation.getFrontendOptions());
std::string InstanceSetupError;
if (CI.setup(Invocation, InstanceSetupError)) {