@@ -1137,28 +1137,14 @@ void InterfaceSubContextDelegateImpl::inheritOptionsForBuildingInterface(
11371137 .EffectiveLanguageVersion .asAPINotesVersionString ()));
11381138
11391139 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- });
11451140 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- });
11511141 if (!SearchPathOpts.SDKPath .empty ()) {
11521142 genericSubInvocation.setSDKPath (SearchPathOpts.SDKPath );
1153- GenericArgs.push_back (" -sdk" );
1154- GenericArgs.push_back (SearchPathOpts.SDKPath );
11551143 }
11561144
11571145 genericSubInvocation.setInputKind (InputFileKind::SwiftModuleInterface);
11581146 if (!SearchPathOpts.RuntimeResourcePath .empty ()) {
11591147 genericSubInvocation.setRuntimeResourcePath (SearchPathOpts.RuntimeResourcePath );
1160- GenericArgs.push_back (" -resource-dir" );
1161- GenericArgs.push_back (SearchPathOpts.RuntimeResourcePath );
11621148 }
11631149
11641150 // Inhibit warnings from the genericSubInvocation since we are assuming the user
@@ -1276,14 +1262,10 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
12761262 SubFEOpts.RequestedAction = FrontendOptions::ActionType::EmitModuleOnly;
12771263 if (!moduleCachePath.empty ()) {
12781264 genericSubInvocation.setClangModuleCachePath (moduleCachePath);
1279- GenericArgs.push_back (" -module-cache-path" );
1280- GenericArgs.push_back (moduleCachePath);
12811265 }
12821266 if (!prebuiltCachePath.empty ()) {
12831267 genericSubInvocation.getFrontendOptions ().PrebuiltModuleCachePath =
1284- prebuiltCachePath.str ();
1285- GenericArgs.push_back (" -prebuilt-module-cache-path" );
1286- GenericArgs.push_back (prebuiltCachePath);
1268+ prebuiltCachePath.str ();
12871269 }
12881270 if (trackSystemDependencies) {
12891271 genericSubInvocation.getFrontendOptions ().IntermoduleDependencyTracking =
@@ -1300,22 +1282,11 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
13001282 }
13011283 genericSubInvocation.getSearchPathOptions ().ExplicitSwiftModules =
13021284 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- }
13101285 // Pass down -explicit-swift-module-map-file
13111286 // FIXME: we shouldn't need this. Remove it?
13121287 StringRef explictSwiftModuleMap = searchPathOpts.ExplicitSwiftModuleMap ;
13131288 genericSubInvocation.getSearchPathOptions ().ExplicitSwiftModuleMap =
13141289 explictSwiftModuleMap;
1315- if (!explictSwiftModuleMap.empty ()) {
1316- GenericArgs.push_back (" -explicit-swift-module-map-file" );
1317- GenericArgs.push_back (explictSwiftModuleMap);
1318- }
13191290 if (clangImporter) {
13201291 // We need to add these extra clang flags because explict module building
13211292 // related flags are all there: -fno-implicit-modules, -fmodule-map-file=,
0 commit comments