mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ExplicitModuleBuild] Support -vfsoverlay swift option
Support `-vfsoverlay` swift option for explicit module build (including caching build). Previously, if the interface file is discovered from a location that is remapped by overlay, module cannot be built correctly. Make sure the overlay options are passed down to all interface compilaiton command. For caching build, need to make sure the overlay itself is part of the CAS file system so the downstream compilation can discover that. rdar://123655183
This commit is contained in:
@@ -1879,6 +1879,13 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
|
||||
genericSubInvocation.getSearchPathOptions().ExplicitSwiftModuleMap =
|
||||
explicitSwiftModuleMap.str();
|
||||
|
||||
// Pass down VFSOverlay flags (do not need to inherit the options because
|
||||
// FileSystem is shared).
|
||||
for (auto &Overlay : searchPathOpts.VFSOverlayFiles) {
|
||||
GenericArgs.push_back("-vfsoverlay");
|
||||
GenericArgs.push_back(Overlay);
|
||||
}
|
||||
|
||||
// Load plugin libraries for macro expression as default arguments
|
||||
genericSubInvocation.getSearchPathOptions().PluginSearchOpts =
|
||||
searchPathOpts.PluginSearchOpts;
|
||||
|
||||
Reference in New Issue
Block a user