File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -131,10 +131,12 @@ struct ModuleInterfaceLoaderOptions {
131
131
bool remarkOnRebuildFromInterface = false ;
132
132
bool disableInterfaceLock = false ;
133
133
bool disableImplicitSwiftModule = false ;
134
+ std::vector<std::string> explicitSwiftModules;
134
135
ModuleInterfaceLoaderOptions (const FrontendOptions &Opts):
135
136
remarkOnRebuildFromInterface (Opts.RemarkOnRebuildFromModuleInterface),
136
137
disableInterfaceLock (Opts.DisableInterfaceFileLock),
137
- disableImplicitSwiftModule (Opts.DisableImplicitModules) {}
138
+ disableImplicitSwiftModule (Opts.DisableImplicitModules),
139
+ explicitSwiftModules (Opts.ExplicitSwiftModules) {}
138
140
ModuleInterfaceLoaderOptions () = default ;
139
141
};
140
142
// / A ModuleLoader that runs a subordinate \c CompilerInvocation and
Original file line number Diff line number Diff line change @@ -1201,6 +1201,14 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
1201
1201
subInvocation.getFrontendOptions ().DisableImplicitModules = true ;
1202
1202
GenericArgs.push_back (" -disable-implicit-swift-modules" );
1203
1203
}
1204
+ subInvocation.getFrontendOptions ().ExplicitSwiftModules =
1205
+ LoaderOpts.explicitSwiftModules ;
1206
+ // Dependencies scanner shouldn't know any explict Swift modules to use.
1207
+ // Adding these argumnets may not be necessary.
1208
+ // FIXME: remove it?
1209
+ for (auto EM: LoaderOpts.explicitSwiftModules ) {
1210
+ GenericArgs.push_back (ArgSaver.save ((llvm::Twine (" -swift-module-file=" ) + EM).str ()));
1211
+ }
1204
1212
if (clangImporter) {
1205
1213
// We need to add these extra clang flags because explict module building
1206
1214
// related flags are all there: -fno-implicit-modules, -fmodule-map-file=,
You can’t perform that action at this time.
0 commit comments