mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ModuleInterface] Determine package-only resolution need based on input mode
Instead of requested action. In implicit builds, implicit interface build sub-invocations inherit their parent invocation's requested action, which the code was failing to detect that we were building an interface, not source, and erroneously resulted in enabling in-package module dependency resolution. Resolves rdar://143505814
This commit is contained in:
@@ -2306,9 +2306,10 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts, ArgList &Args,
|
||||
Opts.ScannerModuleValidation |= Args.hasFlag(OPT_scanner_module_validation,
|
||||
OPT_no_scanner_module_validation,
|
||||
CASOpts.EnableCaching);
|
||||
|
||||
bool buildingFromInterface =
|
||||
FrontendOptions::doesActionBuildModuleFromInterface(
|
||||
FrontendOpts.RequestedAction);
|
||||
FrontendOpts.InputMode ==
|
||||
FrontendOptions::ParseInputMode::SwiftModuleInterface;
|
||||
auto firstInputPath =
|
||||
FrontendOpts.InputsAndOutputs.hasInputs()
|
||||
? FrontendOpts.InputsAndOutputs.getFilenameOfFirstInput()
|
||||
|
||||
Reference in New Issue
Block a user