@@ -2261,11 +2261,12 @@ class SwiftAPIDigesterInvocation {
2261
2261
std::string BaselineSDK;
2262
2262
std::string Triple;
2263
2263
std::string SwiftVersion;
2264
- std::vector<std::string> CCSystemFrameworkPaths ;
2264
+ std::vector<std::string> SystemFrameworkPaths ;
2265
2265
std::vector<std::string> BaselineFrameworkPaths;
2266
2266
std::vector<std::string> FrameworkPaths;
2267
- std::vector<std::string> BaselineModuleInputPaths;
2268
- std::vector<std::string> ModuleInputPaths;
2267
+ std::vector<std::string> SystemModuleImportPaths;
2268
+ std::vector<std::string> BaselineModuleImportPaths;
2269
+ std::vector<std::string> ModuleImportPaths;
2269
2270
std::string ModuleList;
2270
2271
std::vector<std::string> ModuleNames;
2271
2272
std::vector<std::string> PreferInterfaceForModules;
@@ -2362,11 +2363,17 @@ class SwiftAPIDigesterInvocation {
2362
2363
BaselineSDK = ParsedArgs.getLastArgValue (OPT_bsdk).str ();
2363
2364
Triple = ParsedArgs.getLastArgValue (OPT_target).str ();
2364
2365
SwiftVersion = ParsedArgs.getLastArgValue (OPT_swift_version).str ();
2365
- CCSystemFrameworkPaths = ParsedArgs.getAllArgValues (OPT_iframework);
2366
+ SystemFrameworkPaths = ParsedArgs.getAllArgValues (OPT_Fsystem);
2367
+ std::vector<std::string> OldSystemFrameworkPaths =
2368
+ ParsedArgs.getAllArgValues (OPT_iframework);
2369
+ SystemFrameworkPaths.insert (SystemFrameworkPaths.end (),
2370
+ OldSystemFrameworkPaths.begin (),
2371
+ OldSystemFrameworkPaths.end ());
2366
2372
BaselineFrameworkPaths = ParsedArgs.getAllArgValues (OPT_BF);
2367
2373
FrameworkPaths = ParsedArgs.getAllArgValues (OPT_F);
2368
- BaselineModuleInputPaths = ParsedArgs.getAllArgValues (OPT_BI);
2369
- ModuleInputPaths = ParsedArgs.getAllArgValues (OPT_I);
2374
+ SystemModuleImportPaths = ParsedArgs.getAllArgValues (OPT_Isystem);
2375
+ BaselineModuleImportPaths = ParsedArgs.getAllArgValues (OPT_BI);
2376
+ ModuleImportPaths = ParsedArgs.getAllArgValues (OPT_I);
2370
2377
ModuleList = ParsedArgs.getLastArgValue (OPT_module_list_file).str ();
2371
2378
ModuleNames = ParsedArgs.getAllArgValues (OPT_module);
2372
2379
PreferInterfaceForModules =
@@ -2421,7 +2428,7 @@ class SwiftAPIDigesterInvocation {
2421
2428
}
2422
2429
2423
2430
bool hasBaselineInput () {
2424
- return !BaselineModuleInputPaths .empty () ||
2431
+ return !BaselineModuleImportPaths .empty () ||
2425
2432
!BaselineFrameworkPaths.empty () || !BaselineSDK.empty ();
2426
2433
}
2427
2434
@@ -2476,29 +2483,30 @@ class SwiftAPIDigesterInvocation {
2476
2483
InitInvoke.setRuntimeResourcePath (ResourceDir);
2477
2484
}
2478
2485
std::vector<SearchPathOptions::SearchPath> FramePaths;
2479
- for (const auto &path : CCSystemFrameworkPaths ) {
2486
+ for (const auto &path : SystemFrameworkPaths ) {
2480
2487
FramePaths.push_back ({path, /* isSystem=*/ true });
2481
2488
}
2489
+ std::vector<SearchPathOptions::SearchPath> ImportPaths;
2490
+ for (const auto &path : SystemModuleImportPaths) {
2491
+ ImportPaths.push_back ({path, /* isSystem=*/ true });
2492
+ }
2482
2493
if (IsBaseline) {
2483
2494
for (const auto &path : BaselineFrameworkPaths) {
2484
2495
FramePaths.push_back ({path, /* isSystem=*/ false });
2485
2496
}
2486
- std::vector<SearchPathOptions::SearchPath> ImportPaths;
2487
- for (const auto &path : BaselineModuleInputPaths) {
2497
+ for (const auto &path : BaselineModuleImportPaths) {
2488
2498
ImportPaths.push_back ({path, /* isSystem=*/ false });
2489
2499
}
2490
- InitInvoke.setImportSearchPaths (ImportPaths);
2491
2500
} else {
2492
2501
for (const auto &path : FrameworkPaths) {
2493
2502
FramePaths.push_back ({path, /* isSystem=*/ false });
2494
2503
}
2495
- std::vector<SearchPathOptions::SearchPath> ImportPaths;
2496
- for (const auto &path : ModuleInputPaths) {
2504
+ for (const auto &path : ModuleImportPaths) {
2497
2505
ImportPaths.push_back ({path, /* isSystem=*/ false });
2498
2506
}
2499
- InitInvoke.setImportSearchPaths (ImportPaths);
2500
2507
}
2501
2508
InitInvoke.setFrameworkSearchPaths (FramePaths);
2509
+ InitInvoke.setImportSearchPaths (ImportPaths);
2502
2510
if (!ModuleList.empty ()) {
2503
2511
if (readFileLineByLine (ModuleList, Modules))
2504
2512
exit (1 );
0 commit comments