Skip to content

Commit 54163ee

Browse files
committed
[swift-api-digester] Add option to be able to pass a system framework search path.
1 parent 3a493b2 commit 54163ee

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/swift-api-digester/swift-api-digester.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ FrameworkPaths("F", llvm::cl::desc("add a directory to the framework search path
102102
static llvm::cl::list<std::string>
103103
ModuleInputPaths("I", llvm::cl::desc("add a module for input"));
104104

105+
static llvm::cl::list<std::string>
106+
CCSystemFrameworkPaths("iframework", llvm::cl::desc("add a directory to the clang importer system framework search path"));
107+
105108
static llvm::cl::opt<bool>
106109
AbortOnModuleLoadFailure("abort-on-module-fail",
107110
llvm::cl::desc("Abort if a module failed to load"));
@@ -3366,6 +3369,10 @@ static int prepareForDump(const char *Main,
33663369
}
33673370
InitInvok.setFrameworkSearchPaths(options::FrameworkPaths);
33683371
InitInvok.setImportSearchPaths(options::ModuleInputPaths);
3372+
for (auto CCFrameworkPath : options::CCSystemFrameworkPaths) {
3373+
InitInvok.getClangImporterOptions().ExtraArgs.push_back("-iframework");
3374+
InitInvok.getClangImporterOptions().ExtraArgs.push_back(CCFrameworkPath);
3375+
}
33693376

33703377
if (!options::ModuleList.empty()) {
33713378
if (readFileLineByLine(options::ModuleList, Modules))

0 commit comments

Comments
 (0)