[Explicit Module Builds] Explicit interface verification sub-invocations must always inherit -Xcc flags from the parent instance.

Otherwise they may be unable to use the explicit module dependencies which were built in the same driver invocation using those `-Xcc` flags.

Resolves rdar://123648621
This commit is contained in:
Artem Chikin
2024-02-26 14:08:56 -08:00
parent 2a03207e54
commit b9d7ead714
2 changed files with 32 additions and 1 deletions

View File

@@ -1813,7 +1813,10 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
clangImporterOpts.getReducedExtraArgsForSwiftModuleDependency();
genericSubInvocation.getFrontendOptions()
.DependencyScanningSubInvocation = true;
} else if (LoaderOpts.strictImplicitModuleContext) {
} else if (LoaderOpts.strictImplicitModuleContext ||
// Explicit module Interface verification jobs still spawn a sub-instance
// and we must ensure this sub-instance gets all of the Xcc flags.
LoaderOpts.disableImplicitSwiftModule) {
// If the compiler has been asked to be strict with ensuring downstream
// dependencies get the parent invocation's context, inherit the extra Clang
// arguments also. Inherit any clang-specific state of the compilation