Merge pull request #71901 from artemcm/InterfaceVerifyUseXccFix

[Explicit Module Builds] Explicit interface verification sub-invocations must always inherit `-Xcc` flags from the parent instance.
This commit is contained in:
Artem Chikin
2024-02-27 09:12:14 -08:00
committed by GitHub
2 changed files with 32 additions and 1 deletions

View File

@@ -1824,7 +1824,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