@@ -1137,28 +1137,14 @@ void InterfaceSubContextDelegateImpl::inheritOptionsForBuildingInterface(
1137
1137
.EffectiveLanguageVersion .asAPINotesVersionString ()));
1138
1138
1139
1139
genericSubInvocation.setImportSearchPaths (SearchPathOpts.ImportSearchPaths );
1140
- llvm::for_each (SearchPathOpts.ImportSearchPaths ,
1141
- [&](const std::string &path) {
1142
- GenericArgs.push_back (" -I" );
1143
- GenericArgs.push_back (path);
1144
- });
1145
1140
genericSubInvocation.setFrameworkSearchPaths (SearchPathOpts.FrameworkSearchPaths );
1146
- llvm::for_each (SearchPathOpts.FrameworkSearchPaths ,
1147
- [&](const SearchPathOptions::FrameworkSearchPath &path) {
1148
- GenericArgs.push_back (path.IsSystem ? " -Fsystem" : " -F" );
1149
- GenericArgs.push_back (path.Path );
1150
- });
1151
1141
if (!SearchPathOpts.SDKPath .empty ()) {
1152
1142
genericSubInvocation.setSDKPath (SearchPathOpts.SDKPath );
1153
- GenericArgs.push_back (" -sdk" );
1154
- GenericArgs.push_back (SearchPathOpts.SDKPath );
1155
1143
}
1156
1144
1157
1145
genericSubInvocation.setInputKind (InputFileKind::SwiftModuleInterface);
1158
1146
if (!SearchPathOpts.RuntimeResourcePath .empty ()) {
1159
1147
genericSubInvocation.setRuntimeResourcePath (SearchPathOpts.RuntimeResourcePath );
1160
- GenericArgs.push_back (" -resource-dir" );
1161
- GenericArgs.push_back (SearchPathOpts.RuntimeResourcePath );
1162
1148
}
1163
1149
1164
1150
// Inhibit warnings from the genericSubInvocation since we are assuming the user
@@ -1276,14 +1262,10 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
1276
1262
SubFEOpts.RequestedAction = FrontendOptions::ActionType::EmitModuleOnly;
1277
1263
if (!moduleCachePath.empty ()) {
1278
1264
genericSubInvocation.setClangModuleCachePath (moduleCachePath);
1279
- GenericArgs.push_back (" -module-cache-path" );
1280
- GenericArgs.push_back (moduleCachePath);
1281
1265
}
1282
1266
if (!prebuiltCachePath.empty ()) {
1283
1267
genericSubInvocation.getFrontendOptions ().PrebuiltModuleCachePath =
1284
- prebuiltCachePath.str ();
1285
- GenericArgs.push_back (" -prebuilt-module-cache-path" );
1286
- GenericArgs.push_back (prebuiltCachePath);
1268
+ prebuiltCachePath.str ();
1287
1269
}
1288
1270
if (trackSystemDependencies) {
1289
1271
genericSubInvocation.getFrontendOptions ().IntermoduleDependencyTracking =
@@ -1300,22 +1282,11 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
1300
1282
}
1301
1283
genericSubInvocation.getSearchPathOptions ().ExplicitSwiftModules =
1302
1284
searchPathOpts.ExplicitSwiftModules ;
1303
- // Dependencies scanner shouldn't know any explict Swift modules to use.
1304
- // Adding these argumnets may not be necessary.
1305
- // FIXME: remove it?
1306
- for (auto EM: searchPathOpts.ExplicitSwiftModules ) {
1307
- GenericArgs.push_back (" -swift-module-file" );
1308
- GenericArgs.push_back (ArgSaver.save (EM));
1309
- }
1310
1285
// Pass down -explicit-swift-module-map-file
1311
1286
// FIXME: we shouldn't need this. Remove it?
1312
1287
StringRef explictSwiftModuleMap = searchPathOpts.ExplicitSwiftModuleMap ;
1313
1288
genericSubInvocation.getSearchPathOptions ().ExplicitSwiftModuleMap =
1314
1289
explictSwiftModuleMap;
1315
- if (!explictSwiftModuleMap.empty ()) {
1316
- GenericArgs.push_back (" -explicit-swift-module-map-file" );
1317
- GenericArgs.push_back (explictSwiftModuleMap);
1318
- }
1319
1290
if (clangImporter) {
1320
1291
// We need to add these extra clang flags because explict module building
1321
1292
// related flags are all there: -fno-implicit-modules, -fmodule-map-file=,
0 commit comments