Add '-Fsystem' framework search option to indicate path for frameworks that should be treated as 'system'

This has the effect of propagating the search path to the clang importer as '-iframework'.
It doesn't affect whether a swift module is treated as system or not, this can be done as follow-up enhancement.
This commit is contained in:
Argyrios Kyrtzidis
2017-02-14 16:07:02 -08:00
parent ff4b055935
commit ca906d1e99
28 changed files with 159 additions and 57 deletions

View File

@@ -889,8 +889,12 @@ void SwiftLangSupport::findInterfaceDocument(StringRef ModuleName,
const auto &SPOpts = Invocation.getSearchPathOptions();
addArgPair("-sdk", SPOpts.SDKPath);
for (auto &Path : SPOpts.FrameworkSearchPaths)
addArgPair("-F", Path);
for (auto &FramePath : SPOpts.FrameworkSearchPaths) {
if (FramePath.IsSystem)
addArgPair("-iframework", FramePath.Path);
else
addArgPair("-F", FramePath.Path);
}
for (auto &Path : SPOpts.ImportSearchPaths)
addArgPair("-I", Path);