mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Do not build Swift interface files into binary modules when performing a canImport query.
We should hold off actually building the binary module file until it is imported. `canImport` queries can happen, for example, during dependency scanning, when we do not wish to have the scanner tool execute any module builds. Resolves rdar://82603098
This commit is contained in:
@@ -128,7 +128,8 @@ protected:
|
||||
loader->findModuleFilesInDirectory({moduleName, SourceLoc()},
|
||||
SerializedModuleBaseName(tempDir, SerializedModuleBaseName("Library")),
|
||||
/*ModuleInterfacePath*/nullptr,
|
||||
&moduleBuffer, &moduleDocBuffer, &moduleSourceInfoBuffer, /*IsFramework*/false);
|
||||
&moduleBuffer, &moduleDocBuffer, &moduleSourceInfoBuffer,
|
||||
/*skipBuildingInterface*/ false, /*IsFramework*/false);
|
||||
ASSERT_FALSE(error);
|
||||
ASSERT_FALSE(diags.hadAnyError());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user