[Dependency Scanning] Restore propagation of -Xcc flags to scanner's Swift Textual interface-reading sub-invocation

This commit is contained in:
Artem Chikin
2023-10-30 16:41:40 -07:00
parent be11dc6101
commit 9eee1ec4f4
2 changed files with 37 additions and 1 deletions

View File

@@ -1747,7 +1747,8 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
// If the compiler has been asked to be strict with ensuring downstream dependencies
// get the parent invocation's context, or this is an Explicit build, inherit the
// extra Clang arguments also.
if (LoaderOpts.strictImplicitModuleContext || LoaderOpts.disableImplicitSwiftModule) {
if (LoaderOpts.strictImplicitModuleContext || LoaderOpts.disableImplicitSwiftModule ||
LoaderOpts.requestedAction == FrontendOptions::ActionType::ScanDependencies) {
// Inherit any clang-specific state of the compilation (macros, clang flags, etc.)
subClangImporterOpts.ExtraArgs = clangImporterOpts.ExtraArgs;
for (auto arg : subClangImporterOpts.ExtraArgs) {